Stooney Posted December 14, 2012 Share Posted December 14, 2012 So I'm working on a class that loops through a list of remote images and displays some based on width/height criteria (http://website.com/img.jpg, etc). I'm simply using getimagesize($img) to get the info I need. The issue is that I want to display each image as it's validated. As it is, nothing is displayed until the script is finished, then it's all displayed at once. I have the script set to echo the img (<img src="..." />) during each pass of the loop (if it matches the criteria), but yet it still waits till the end of the script to display everything. I've tried using output buffering and flushing with each pass, same result. Is there something I dont know about when reading remote files that causes this behavior? Link to comment https://forums.phpfreaks.com/topic/272004-avoid-output-buffering-when-dealing-with-remote-files/ Share on other sites More sharing options...
requinix Posted December 14, 2012 Share Posted December 14, 2012 Do you have an example URL we can check? [edit] The script does need to flush() at a minimum. Link to comment https://forums.phpfreaks.com/topic/272004-avoid-output-buffering-when-dealing-with-remote-files/#findComment-1399451 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.