the source of the problem is gethostbyaddr(). it seems to have a 4,5
second timeout, so some lookups time out after 4,5 seconds, while most
of them are resolved in < 0.1 second; a radically performance
difference.

the user written gethostbyaddr_timeout() on the gethostbyaddr man page
overcomes this problem, but unlike gethostbyaddr() requires a specific
dns address, which seems unavailable from php at the moment.

parsing nslookup and similar things seems like a workaround. where
does one propose a dns_ip() function which returns the system's
default dns ip address?

or better yet, to add a timeout value to gethostbyaddr(), or in some
other way ensure that lookups return quickly, whether they have an
answer or not.

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

Reply via email to