Re: email address syntax checker
| From: | Andre Polykanine | Date: | Fri, 21 Jan 2011 00:55:29 +0000 |
| Subject: | Re: email address syntax checker | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-310936@lists.php.net to get a copy of this message | ||
Hej Nisse,
Me thinks it isn't a valid address :-).
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
------------ Original message ------------
From: Nisse Engström <news.NOSPAM.0ixbtqKe@luden.se>
To: php-general@lists.php.net
Date created: , 2:25:01 AM
Subject: [PHP] email address syntax checker
On Thu, 20 Jan 2011 19:03:22 +0530, Nilesh Govindarajan wrote:
> Well, I had created an email validator long ago, after a neat research
> on Google, reading RFCs, etc.
> I don't guarantee that it's without bugs, but it has been correct for me
> in all valid & invalid email addresses I used for test.
>
> Code:
>
> <?php
>
> function checkMail($mail) {
>
> if(strlen($mail) <= 0) {
> return false;
> }
>
> $split = explode('@', $mail);
>
> if(count($split) > 2) {
> return false;
> }
<"@"@example.com> is not a valid address?
/Nisse
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php