Using the dns_check_record() Function : DNS Functions « DNS « PHP






Using the dns_check_record() Function

 
<?php

    $hostname = "google.com";

    if(dns_check_record($hostname, "NS")) {

        echo "An authoritative name server exists.\n";

    } else {
        echo "No name server was found for this domain\n";

    }

?>
  
  








Related examples in the same category

1.DNS Lookup Functions
2.DNS Record Types and Their Meanings
3.Fetches DNS records associated with a hostname
4.Performing DNS Lookups