Re: fsockopen timeout
| From: | Peter Clarke | Date: | Fri, 15 Feb 2002 14:54:26 +0000 |
| Subject: | Re: fsockopen timeout | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84911@lists.php.net to get a copy of this message | ||
OK I've found it...
The time out value is a FLOAT. So a timeout of 1 second is 1.0.
Strange since the examples in the manual are integers.
Anyway this works:
$socket = fsockopen($urlArray["host"], $urlArray["port"], &$errnum,
&$errstr, 1.0);
"Peter Clarke" <peter@jingo.com> wrote in message
news:20020215105903.81280.qmail@pb1.pair.com...
> According to the manual;
> http://www.php.net/manual/en/function.fsockopen.php
> Depending on the environment, optional connect timeout may not be
available.
>
> Does anyone know what environment is needed for it to be available?
> I have Redhat Linux 7.1 - and the timeout doen't seem to work.
>
> Any ideas?
>
> Peter
>