Vanessa Vasile's Blog: Using PHP to Perform DNS Lookups
Note: This article was originally published at PHPDeveloper on 2 July 2010.
In a handy little post to her blog today Vanessa Vasile has an example of how to use built-in PHP functions to perform DNS lookups in your scripts.
PHP has a couple DNS functions you can use to perform record lookups. Most of us are familiar with the two basic ones - gethostbyname() and gethostbyaddr(), both of which perform a single function '" returning a hostname or IP address.