RE: [PHP] newbie: contents will not output
| From: | John W. Holmes | Date: | Tue, 11 Mar 2003 03:38:49 +0000 |
| Subject: | RE: [PHP] newbie: contents will not output | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139076@lists.php.net to get a copy of this message | ||
> I'm trying to test the following script to display the contents of the
> following URL but it will not output.
>
> Any advice will be greatly appreciated.
> Thank you.
> Tony Ritter
> .......................................................
>
> <html>
> <head>
> </head>
> <body>
> <?
> $file_handler = fopen("http://www.weather.com",
> "r");
> $contents = fread($file_handler, filesize($file));
> fclose($file_handler);
> echo $contents;
> ?>
> </body>
> </html>
filesize() won't work on remote files (through http) and like Justin
said... what's $file??
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/