Anthony,

Try:

 $file_to_open="http://www.weather.com";;
 $fp=fopen($file_to_open,"r");
 $contents=fread($fp,10000); //reads to eof or  ~10K whichever comes first
 print $contents;

Hope this helps.
Hugh
----- Original Message ----- 
From: "Anthony Ritter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 7:22 PM
Subject: [PHP] newbie: contents will not output


> 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>
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to