Re: What this means "(\w|-)+@\w"? [message #174998 is a reply to message #174995] |
Tue, 02 August 2011 09:50 |
alvaro.NOSPAMTHANX
Messages: 277 Registered: September 2010
Karma:
|
Senior Member |
|
|
El 02/08/2011 10:06, Sandman escribió/wrote:
> What's wrong with the PHP built in email validator?
>
> <?
> if (filter_var($email, FILTER_VALIDATE_EMAIL)){
> # Do fancy stuff, such as sending fancy email!
> }
> ?>
For instance:
var_dump(filter_var('webmaster@álvaro.es', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('webmaster(at)asxn--lvaro-wqa(dot)es', FILTER_VALIDATE_EMAIL));
bool(false)
bool(false)
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
|
|
|