PHP Code:
function check_email($email)
{
{
if( (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) ||
(preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) {
$dom = explode('@', $email);
if(checkdnsrr($dom[1].'.', 'MX') ) return true;
if(checkdnsrr($dom[1].'.', 'A') ) return true;
if(checkdnsrr($dom[1].'.', 'CNAME') ) return true;
}
return false;
}
If anybody has a better function please share hare. I need.
Comment