Re: Fopen errors out when opening a URL
| From: | Richard Lynch | Date: | Thu, 18 Jul 2002 23:22:48 +0000 |
| Subject: | Re: Fopen errors out when opening a URL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108378@lists.php.net to get a copy of this message | ||
>I am trying to do a simple fopen("R‹Ø�‰x¶tQ
>ì1³http://www.weather.com/index.html", "r");
>For some reason I cannot Open any URL's after trying several.
>
>I get the following error
>
>Warning: stat failed for Resource id #1 (errno=2 - No such file or
>directory)
It's possible that weather.com is sending cookies and refusing access if you
aren't logged in or something...
To be sure, SSH (telnet) in to your server, or open an MS-DOS shell, and do
this from a command prompt:
telnet www.weather.com 80
GET /index.htm HTTP/1.0
host: www.weather.com
Hit 'return' twice after that last line, and be ready for a lot of crap to
come out. Or not. Whatever you see there is what PHP is seeing, almost for
sure.
I think cURL might be the easiest way around that, though I hate to put cURL
and easy in the same sentence.
--
Like Music? http://l-i-e.com/artists.htm