note 38033 added to function.fopen
| From: | ted at tedmurph dot com | Date: | Fri, 05 Dec 2003 13:20:15 +0000 |
| Subject: | note 38033 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61446@lists.php.net to get a copy of this message | ||
What is the best way to timeout the opening of a page over the internet if the page your are trying
to retrieve hangs?
I tried using fsockopen and socket_set_timeout, but I got the same problem -- 99 times out of 100,
the page is opened fine. But that 1 time out of 100, it hangs and the program just sits there for 5
mins or so. Retrying the page, and it pops right up. This is making my automation of a nightly
download very flaky.
Any help is very greatly appreciated. Thanks!
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38033
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38033&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38033&report=yes
Search -- http://master.php.net/manage/user-notes.php