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? Quote 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 (edited) Do you have an example URL we can check? [edit] The script does need to flush() at a minimum. Edited December 14, 2012 by requinix Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.