Jump to content

Avoid 'output Buffering' When Dealing With Remote Files?


Stooney

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.