hi
i'm having some difficulty in determining how to differentiate between gethostbyname() function call timing out, or not being able to find the host information at all.
I'm most interested in the time it takes to actually find the host information, or how long it takes to time out.
if i implement this for example:
$ipaddr = gethostbyname("www.thisisnotawebsite.com");
it takes no time at all for the dns server to return telling that the hostname is invalid.
From what I've tested, it takes around 20 seconds before the function returns undefined for $ipaddr. However, this difference isn't particularly accurate because it may be the case that it takes 20 seconds or more for the dns server to actually reply with the host information, or to return that the host is invalid.
anyone have a solution for this? If there needs to be clarification, i will clarify to the best of my ability!!
kennzors
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |