Re: fsockopen timeout not working
| From: | Rasmus Lerdorf | Date: | Tue, 08 Oct 2002 03:52:30 +0000 |
| Subject: | Re: fsockopen timeout not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119203@lists.php.net to get a copy of this message | ||
You should read up on socket_select
On Tue, 8 Oct 2002, Scott Dowd wrote:
> I have a PHP application that goes out an checks all our servers via
> SNMP when requested. Trouble is, if the server is not available, the
> fsockopen never times out and therefore never moves onto the next
> server. I am running 4.2.3 on IIS (NT4). I read there was a bug with
> previous versions, but I have just upgraded and still seems to be a
> problem ...... Script times out.
>
> $fp = fsockopen ($servername, 524, $errno, $errstr, 30);
>
> if (!$fp) {
> ........
> }
>
> else {
> ........
> }
>