Lookups on Hostnames :
Note that this PHP API does NOT support lookups on
hostnames. This is so that the public API can be kept
simple and so that the lookup functions don't need to try
name lookups if IP lookup fails (which would be the only
way to keep the API simple and support name-based lookups).
If you do not know the IP address, you can convert an name
to IP very simply using PHP native functions or other
libraries:
Or, if you don't know whether an address is a name or IP
address, use application-level logic: