note 38033 rejected from function.fopen by didou

From: Date: Fri, 05 Dec 2003 13:41:19 +0000
Subject: note 38033 rejected from function.fopen by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-61448@lists.php.net to get a copy of this message
Note Submitter: ted@tedmurph.com ---- 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!

« previous php.notes (#61448) next »