Why doesn't gethostbyaddr() work?
Posted: Thu Aug 20, 2009 2:04 pm
I have a script that analyzes my apache log files. I use gethsotbyaddr() to find the alpha version of ip addresses. It works about 50% of the time. Otherwise it returns the numeric ip address. If I run whois on the same ip address I
usually get an answer. One example that I just saw that does not work is baidu. Is there a way to get gethostbyaddr() to work better? I was even thinking of abandoning gethostbyaddr() and spawning whois instead.
thanks,
William
usually get an answer. One example that I just saw that does not work is baidu. Is there a way to get gethostbyaddr() to work better? I was even thinking of abandoning gethostbyaddr() and spawning whois instead.
thanks,
William