PHP/Network/checkdnsrr
checkdnsrr-2.php
<?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]!";
?>
checkdnsrr.php
<?php
$recordexists = checkdnsrr("example.ru", "ANY");
if ($recordexists) echo "The domain name has been taken. Sorry!";
else echo "The domain name is available!";
?>