CodeExplorer _isReserved example
private function _validateMXRecords() { $mxHosts = array
();
$result =
getmxrr($this->_hostname,
$mxHosts);
if (!
$result) { $this->
_error(self::INVALID_MX_RECORD
);
} else if ($this->_options
['deep'
] &&
function_exists('checkdnsrr'
)) { $validAddress = false;
$reserved = true;
foreach ($mxHosts as $hostname) { $res =
$this->
_isReserved($hostname);
if (!
$res) { $reserved = false;
} if (!
$res && (checkdnsrr($hostname, "A"
) ||
checkdnsrr($hostname, "AAAA"
) ||
checkdnsrr($hostname, "A6"
))) { $validAddress = true;
break;
} }