PHP/Network/checkdnsrr
checkdnsrr-2.php
<source lang="html4strict">
<?php
$email = "ceo@example.ru"; $domain = explode("@",$email); $valid = checkdnsrr($domain[1], "ANY"); if($valid) echo "The domain has an MX record!"; else echo "Cannot locate MX record for $domain[1]!";
?>
</source>
checkdnsrr.php
<source lang="html4strict">
<?php
$recordexists = checkdnsrr("example.ru", "ANY"); if ($recordexists) echo "The domain name has been taken. Sorry!"; else echo "The domain name is available!";
?>
</source>