PLEASE HELP :: fsockopen and v3.0.7
| From: | Scott Brown | Date: | Sat, 28 Oct 2000 01:47:41 +0000 |
| Subject: | PLEASE HELP :: fsockopen and v3.0.7 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22405@lists.php.net to get a copy of this message | ||
I'm trying to write a whois script using v3.0.7 (dont ask...version 4 is
coming "soon"... so I figure around christmas ;-)
I picked up the code off phpbuilder.com to do something like this
$server = "whois.internic.net"
$fp = fsockopen($server, 43, &$errno, &$errstr,10);
if (!$fp)
{
echo "$errstr ($errno)<BR>\n";
}
else
etc.... and the code runs fine on my server here at home (v4.0x)
But the hosting I'm on balks at the number of arguements in the fsockopen()
call (it's v 3.0.7 and the timeout value only became available in 3.0.9).
When I run the code without a timeout value, it sits there, for about 10-15
seconds before returning without setting $fp, and with a blank $errstr and
$errno.
How can I work around this annoying fsockopen problem, producing a quick
(and valid!) response while I'm waiting on version 4 support ????
Thanks
Scott.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net