Hi guys,
I am trying to read from a remote file, by using an example reported at the
manual page for the fread function:
<?php
$handle = fopen ("http://www.php.net/", "rb");
$contents = "";
do {
$data = fread ($handle, filesize ($filename));
if (strlen($data) == 0) {
break;
}
$contents .= $data;
}
fclose ($handle);
?>
Unfortunately this example is incorrect, as it gives me a parse error. The
mistake should be in the fact that there is a "do" keyword without a
"while".
Would anyone suggest me the correct version?
Cheers
Daniele
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php