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@xxxxxxxx> To: php-general@xxxxxxxxxxxxx Date created: , 2:25:01 AM Subject: 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php