<?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"; } ?>