<[EMAIL PROTECTED]>
Thomas:
> Hi Everyone.
>
> I'm having problems creating code to read a file from another server.
>
> 1.  Is this even possible?  with a secure server aswell?
> 2.  I have tried using     fopen()    but this always gives me an
> error:
>
> Warning: stat failed for http://www.domain.com/test.txt (errno=2 - No
> such file or directory) in
> /home/domain/public_html/php/testphp/test.php on line 4
>
> this is my code:
> <?php
>     $filename = "http://www.domain.com/test.txt";;
>     $handle = fopen ($filename, "r");
>     $content = fread($handle, filesize ($filename));
>     fclose($handle);
>
>     echo $content;
>
>>
>
> can anyone help me.   I need to put this on my server, and read this
> other file form a game server....but I can't seem to do it.
>
> Cheers for any help

Quote:
If PHP has decided that filename specifies a registered protocol, and that
protocol is registered as a network URL, PHP will check to make sure that
allow_url_fopen is enabled. If it is switched off, PHP will emit a warning
and the fopen call will fail.

But then again, that's not the error it gave...



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

Reply via email to