Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500

Think I deserve a present? See my Amazon Wish List


This simply tells us if a particular DNS record was found, so could be useful to see if an entered hostname was valid within an email check.

checkdnsrr -- Check DNS records corresponding to a given Internet host name or IP address
$check=checkdnsrr("hostname", "A");

Let us assume a couple of entries, the first being the valid, the second being the invalid (extra y)


$check=checkdnsrr("", "A");

Check: 1

$check=checkdnsrr("", "A");

Check: 1

Notice the later domain fails and doesn't return a value

See also gethostbyaddr, and Ban Access from an IP address with PHP

Share this!  

Php Checkbox Check | Php Checkdnsrr | Php Contact Form


  Tips | Home | Search | Contact

Link here: