Re: fopen, fread
| From: | Philip Olson | Date: | Fri, 21 Sep 2001 17:59:22 +0000 |
| Subject: | Re: fopen, fread | ||
| References: | 1 | Groups: | php.dev php.general |
| Request: | Send a blank email to php-dev+get-66302@lists.php.net to get a copy of this message | ||
hi dries-
filesize() will not work on remote files. if you want to put an entire
remote url into a string, here's one way :
$url = 'http://www.example.com/');
$site = implode('',file($url));
print $site;
also, please never ask php-dev support questions.
regards,
Philip Olson
On Fri, 21 Sep 2001, Dries Plessers wrote:
> Hello,
>
> Can anybody tell me what is wrong. $file contains nothing ?????
>
> Thanks very much !
> Dries
>
>
> $fileName="http://www.proxis.com";
> $fp=fopen($fileName, "r");
> $file=fread($fp, filesize($fileName));
> fclose($fp);
> print("$file");
>
>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>