faqts : Computers : Programming : Languages : PHP : Function Libraries

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 29 people (69%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I get the MX records for a domain from inside PHP?
How can I get DNS records for a domain or IP from inside PHP?
Can I get the IP address for a known host in PHP?

Jul 4th, 1999 21:46
Nathan Wallace, Stephen Benjamin


Network Functions:
    http://www.php.net/manual/ref.network.php3

gethostbyaddr - Get the Internet host name corresponding to
a given IP address:
    http://www.php.net/manual/function.gethostbyaddr.php3

gethostbyname - Get the IP address corresponding to a given Internet
host name:
    http://www.php.net/manual/function.gethostbyname.php3

gethostbynamel - Get a list of IP addresses corresponding to a given
Internet host name:
    http://www.php.net/manual/function.gethostbynamel.php3

checkdnsrr - Check DNS records corresponding to a given Internet
host name or IP address:
    http://www.php.net/manualfunction.checkdnsrr.php3

getmxrr - Get MX records corresponding to a given Internet
host name:
    http://www.php.net/manual/function.getmxrr.php3