note 95451 deleted from function.fread by thiago
| From: | thiago@php.net | Date: | Mon, 04 Jan 2010 13:04:16 +0000 |
| Subject: | note 95451 deleted from function.fread by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164595@lists.php.net to get a copy of this message | ||
Note Submitter: splitice
----
I ran into troubles when trying to fread from either a file or URL, for my image mirror script
(http://thewarezscene.org/i/161570/keywords.jpg) after a huge amount of fiddeling,
I realised that a loop such as:
while(($read = fread($fp,8096))!== ''){
echo $read;
if($fp2) fwrite($fp2,$read);
flush();
ob_flush();
}
Wouldnt work unless stream_set_timeout was called e.g
stream_set_timeout($fp, 2);