Hi,
I am checking the given mails for my site registeration with the below function:
function validate_email ( $email, $check_domain=false )
{
if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.
'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email))
{
if ($check_domain && function_exists('checkdnsrr')) {
list (, $domain) = explode('@', $email);
if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {
return true;
}
return false;
}
return true;
}
return false;
}
I don't know who wrote this one but works well, but this script checks only the domain availability. For ex: the domain "keew.com" exists but the "yourname@keew.com" doesn't exists. So How can I find this out? I mean I also want to know the mailbox is present or not?
Thank you,
Cem Louis