> Can anyone tell me what the best form of Email validation 
> there is?  It needs to be quick & as open to - and . as possible.

We use this one on www.inww.com:

<?
   Function validEmail($emailaddress)
   { 
     // Decides if the email address is valid. Checks syntax and MX records,
     // for total smartass value. Returns "valid", "invalid-mx" or 
     // "invalid-form".
   
     // Validates the email address. I guess it works. *shrug*
     if
(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",
$emailaddress, $check))
     {
       //if ( getmxrr(substr(strstr($check[0], '@'), 1),
$validate_email_temp) ) 
       if ( checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY") ) 
       { return "valid"; }
       else
       { return "invalid-mx"; } 
     }
     else
     {
       return "invalid-form"; 
     }
   }
?>

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to