note 14816 deleted from function.ereg by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:30:00 +0000 |
| Subject: | note 14816 deleted from function.ereg by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20158@lists.php.net to get a copy of this message | ||
NEW Result: For checking validity of an email.
function checkmail ($email) {
if
(eregi("^[0-9a-z]([-_.]?[0-9a-z]*)*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](g|l|m|pa|t|u|v)?$",
$email, $check)) {
if (checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY")) {
return TRUE;
}
}
return FALSE;
}
I added a "*" to the above
function checkmail, because of matching emails like "mymail.@myprovider.com"