checkdnsrr
Check DNS records corresponding to the given Internet hostname or IP address
checkdnsrr()
function checks DNS records of the type corresponding to the host.
We can use the checkdnsrr()
function to check our DNS record to verify that the domain name exists.
Check DNS records:
<?php $domain = "gitbox.net" ; if ( checkdnsrr ( $domain , "MX" ) ) { echo "Passed" ; } else { echo "Failed" ; } ?>
checkdnsrr ( host , type )
parameter | describe |
---|---|
host | Required. Specifies the IP address or host name to check. |
type |
Optional. Specify the type. It can be one of the following:
|