Re: Reading from remote file

From: Date: Sun, 06 Jul 2003 13:10:47 +0000
Subject: Re: Reading from remote file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154119@lists.php.net to get a copy of this message
Since you're using a break to determine when to leave why not... > <?php > $handle = fopen ("http://www.php.net/", > "rb"); > $contents = ""; while (!(feof($handle))) > { > $data = fread ($handle, filesize ($filename)); > if (strlen($data) == 0) { > break; > } > $contents .= $data; > } > fclose ($handle); > ?>

« previous php.general (#154119) next »