also, you might like to do some client-side validation before sending it to
the server, in which case you can use somehting like
http://www.dentedreality.com.au/jsvalidation/

HTH

Beau

// -----Original Message-----
// From: [EMAIL PROTECTED]
// [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 21 June 2002 12:00 AM
// To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
// Subject: RE: [PHP-DB] E-mail address verification
// 
// 
// 
// 
// 
// I do it like this:
// 
// 
//     if 
// (eregi("^[a-z0-9]+([\.%!][_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",
// $email))
//     {
//       list($user, $host) = explode("@", $email);
//       if ( !checkdnsrr($host, "MX") )
//       return TRUE;
//     }
//     else
//     {
//       return FALSE;
//     }
//   }
// 
// As you can see, the email can "look" right, but domain isn't 
// valid. So you
// can check DNS record for MX domain.
// Next step is to connect to mail server and verify user, but 
// usualy that
// takes time and it's better to send some kind of auth code to 
// that mail and
// if user conforms it, you can use it...
// 
// This worked very well. For any of you out there that are 
// looking for a
// simple verification with host dns lookup, here it is!!!
// 
// For a more comprehensive "class" check here, thanks to Manuel Lemos
// 
// http://www.phpclasses.org/emailvalidation
// 
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to