Find Email address Has Valid MX record
function domain_exists($email, $record = 'MX'){
list($user, $domain) = split('@', $email);
return checkdnsrr($domain, $record);
}
if(domain_exists('user@davidwalsh.name')) {
echo('This MX records exists; I will accept this email as valid.');
}
else {
echo('No MX record exists; Invalid email.');
}
?>
0 comments:
Post a Comment
Thanks for your valuable feedback