
September 17th, 2004, 04:24 PM
|
|
Contributing User
|
|
Join Date: Oct 2002
Posts: 49
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
About mailbox availability
Hi,
I am checking the given mails for my site registeration with the below function:
PHP Code:
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
|