--- Max Clark <[EMAIL PROTECTED]> wrote:
> Warning: socket_connect() unable to connect [60]:
> Operation timed out in
> /usr/home/maxc/public_html/admin/functions.inc on line 66
> Is there any way to time out this function? I only want
> to wait 5 seconds.

Now that you mention it, I am not aware of any way to
override that timeout setting. The socket extension is
still experimental, I believe, with hopes of changing its
status soon. Perhaps this is something someone is working

As a possible way around this, could you possible solve
your problem by opening a socket as a virtual file pointer
instead? For example, this would only wait 5 seconds for a

$fp=fsockopen($host, $port, $err_num, $err_message, "5");

You can treat $fp like any other file pointer, so it is
actually a pretty convenient way to read/write to sockets.

Hope that helps.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to