checkdnsrr
($host, $type) 该函数在DNS中检查与$host主机相符的$type类型记录,如发现,即返回布尔真值。
用此函数检查主机中是否存在某个特定的DNS记录类型。 代码:
<?php
$ret = checkdnsrr
('techrepublic.com', SOA);
if ($ret) {
echo 'SOA records
exist for host';
} else {
echo 'SOA records do
not exist for host';
}
?>