Re: [PHP] Reading from remote file

2003-07-06 Thread Philip Olson
This is already fixed in CVS. The entire example is bogus, it should not be using filesize($filename) either. Here's what's in CVS (the manual will be rebuilt sometime in the next week): http://www.example.com/";, "rb"); $contents = ""; do { $data = fread($handle, 8192); if (strlen($da

Re: [PHP] Reading from remote file

2003-07-06 Thread Dan Anderson
Since you're using a break to determine when to leave why not... > $handle = fopen ("http://www.php.net/";, "rb"); > $contents = ""; while (!(feof($handle))) > { > $data = fread ($handle, filesize ($filename)); > if (strlen($data) == 0) { > break; > } > $contents .= $dat