Re: Problem with fopen URL wrapper.
| From: | jeremy brand | Date: | Tue, 19 Dec 2000 22:58:55 +0000 |
| Subject: | Re: Problem with fopen URL wrapper. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31069@lists.php.net to get a copy of this message | ||
Maybe because you are getting an HTTP redirect? I don't know, just a
thought.
-- snip --
$ telnet yahoo.com 80
Trying 216.115.108.243...
Connected to yahoo.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: yahoo.com
HTTP/1.0 302 RD
Location: http://www.yahoo.com/
-- snip --
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"<body>" -- Quoted from Yahoo! homepage, http://www.yahoo.com
On Tue, 19 Dec 2000, Richard Heyes wrote:
> Date: Tue, 19 Dec 2000 14:20:27 -0000
> From: Richard Heyes <richardh@web-ideas.com>
> To: php-general@lists.php.net
> Cc: PHP_UK@egroups.com
> Subject: [PHP] Problem with fopen URL wrapper.
>
> Got php4.03pl1 installed on RHL6.2 with Apache 1.3.12 and am having
> intermittent difficulties with fopen'ing urls. When issuing the fopen() call
> it will hang for a couple of minutes. Network access for other stuff on the
> same machine is fine, eg a perl script doing a similar thing with socket
> functions (socket/connect (?) ) works great. I've done an strace like so:
>
> strace php -q test.php
>
> Where test.php is this:
>
> $fp = fopen('http://yahoo.com/', 'r');
> fclose($fp);
>
> It seems to hang at a poll() function:
>
> ...
> close(3) = 0
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
> connect(3, {sin_family=AF_INET, sin_port=htons(53),
> sin_addr=inet_addr("192.168.10.1")}}, 16) = 0
> send(3, "0P\1\0\0\1\0\0\0\0\0\0\5yahoo\3com\0\0\34\0\1", 27, 0) = 27
> time(NULL) = 977234104
> poll(
>
> Which then repeats.
>
> For whatever reason, using IP addresses seems to work most of the time, but
> not always (yahoo.com for example).
>
> TIA for any help!
> --
> Richard Heyes
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>