Jump to content

Avoid 'output Buffering' When Dealing With Remote Files?


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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.