Re: Verify Email
| From: | Yev | Date: | Thu, 21 Dec 2000 03:47:58 +0000 |
| Subject: | Re: Verify Email | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31355@lists.php.net to get a copy of this message | ||
how about this:
// Returns true if the email is invalid
function invalid_email() {
global $HTTP_GET_VARS;
list($uname, $host) = split('@', $HTTP_GET_VARS[email]);
return(!$host || !checkdnsrr($host));
}
--- WebWorkshop <webmaster@webworkshop.org> wrote:
> Hi, this is my first posting to this list. Here's the one I came up
> with;
> it's my first try, would appreciate any comments:
>
> eregi("^[a-z0-9]{1}[a-z0-9._-]*@[a-z0-9]{1}[a-z0-9-]*\.[a-z.]{2,}$",
> $email)
>
> This one allows four-letter (or more, actually) TLDs (like .aero).
>
> ~ Chris Calabrese
> WebWorkshop Webmaster
> http://www.webworkshop.org
>
> ----- Original Message -----
> From: "Daniel Convissor" <danielc@analysisandsolutions.com>
> To: "PHP List" <php-general@lists.php.net>
> Sent: Wednesday, December 20, 2000 10:39 AM
> Subject: Re: [PHP] Verify Email
>
>
> > Greg and crew:
> >
> > > Would appreciate suggestions on rewrites..
> >
> > if ( !eregi("^[a-z0-9_.=-]+@([a-z0-9-]+\.)+([a-z]{2,3})$",
> "$Email") ) {
> > echo "BAD DOG!";
> > }
> >
> > --Dan
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
> .
> s, e-mail: php-list-admin@lists.php.net
>
> .
>
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/