Hi Richard, 

thaks for clarifying that to me. The only problem now is that I get a
timeout in my script because fopen() failed to open the stream.

I have checked that the address is okay. I manage to open another
site, but not this file which is on my ISP. Actually, manual telnet to
port 80 of my web site failed. Does the way fopen() accesses the web
different from how Internet Explorer does it?

--
Børge


> Hello Børge,
> 
> Tuesday, January 13, 2004, 10:32:08 AM, you wrote:
> 
> BS> Do you see something that it obviously wrong here?
> 
> You need to loop through the data as it comes back from the fopen
> function.
> 
> <?php
>     print '<html><body>' . "\n";
>     print 'test6.php<br>';
> 
>         $handle = fopen("http://www.boggle.no/message.txt";, "rb");
>         $contents = "";
>         do {
>             $data = fread($handle, 8192);
>             if (strlen($data) == 0) {
>                 break;
>             }
>             $contents .= $data;
>         } while (true);
>         fclose($handle);
> 
>     print $contents;
>     print '</body></html>' . "\n";
> ?>
> 
> -- 
> Best regards,
>  Richard                            mailto:[EMAIL PROTECTED]
> 
> -- 
> 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