Check DNS records:
<?php
$domain="91xjr.com";
if(checkdnsrr($domain,"MX")) {
echo "Passed";
} else {
echo "Failed";
}
?>
The checkdnsrr() function checks DNS records for type corresponding to host.
We can use the checkdnsrr() function to check our DNS record to verify the existence of a domain name or not.
checkdnsrr(
host,
type)
Parameter | Description |
---|---|
host | Required. Specifies an IP address or host name to check |
type | Optional. Specifies the type. Can be one of the following:
|
Return Value: | TRUE if any records are found, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: Now available on Windows platforms PHP 5.2.4: Added the TXT value of type |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!