On Thursday, December 4, 2003, at 01:35 PM, John W. Holmes wrote:

Blake Schroeder wrote:
Whats the best way to validate email address (check for white space, check for .com, .net.edu etc)

Just check for some text with a single @ in the middle. Honestly... If you're relying on the email any more than that, I'd have to wonder > why.


The only way to truly validate an email address is to send an email to it with a code (or webbug) validating the user (or bot) actually received the email.

The only email validation script I've been comfortable with is this: http://www.killersoft.com/downloads/pafiledb.php?action=file&id=5

It's a PHP port of a widely accepted Perl script which (from the comments):
// Follows RFC 822 about as close as is possible.
// http://www.faqs.org/rfcs/rfc822.html


Other than that, yeah I'd just check for "something"@"something with at least one period"


Justin French


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



Reply via email to