You are here: Re: Richard Lynch's Email Address ... « PHP « IT news, forums, messages
Re: Richard Lynch's Email Address ...

Posted by Ben Ramsey on 11/13/44 11:31

On 11/9/05 7:20 PM, GamblerZG wrote:
> James Benson wrote:
>
>> Would it not be better something like valid_email()
>
> email_validate()?
>
> Anyway, I agree that PHP needs such function.

Check out http://pecl.php.net/package/filter

<?php
$clean['email'] = input_get(INPUT_POST, 'email', FL_EMAIL);
?>

I've been playing around with this for a while, and it should be noted
that it's still in beta and should not be used in a production
environment, but it's a promising step. The e-mail regex that's used
isn't perfect, and it won't support RFC-compliant addresses, but I hope
to put a little bit of work into it to help out with this.

In the meantime, check out PEAR::Mail, which includes Mail_RFC822 that
can be used to validate e-mail addresses. Also, if your PHP is compiled
--with-imap, then you can use imap_rfc822_parse_adrlist() to validate
e-mail addresses.

--
Ben Ramsey
http://benramsey.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация