|
Posted by Rik Wasmus on 01/24/08 11:45
On Thu, 24 Jan 2008 12:20:50 +0100, ibizara <ibizara@googlemail.com> wro=
te:
> @$email =3D addslashes($_POST['email']);
>
> if (! ereg('^[*a-z\'0-9]+([._-][*a-z\'0-9]+)*@([a-z0-9]+([._-][a-
> z0-9]+))+$', $email))
You do realise this will make a lot of valid emailadresses invalid? =
Domains are not limited to the ascii set for instance, and [a-z0-9'._-] =
=
are not the only valid characters in an email name.
Also, it's recommended to use the preg_* functions instead of ereg*
> {
> include_once("error.inc");
> die();
> }
>
> ---
> I need to add a if contains the below then include_once("error.inc");
>
> Spam =3D /.*@(hsbc|barclays|hotmail)\.com$/.test(Addr)
Hmmm? I often use my spambucket hotmail address (see my mailaddress :) )=
of =
10 years ago for sites I'm not sure about. (Yes, I can still access it, =
=
but I normally won't unless I just registered with that mail / about onc=
e =
every 1 or 2 months)
if(preg_match('/@(hsbc|barclays|hotmail)\.com$/i',$email)){
//the code
}
-- =
Rik Wasmus
[Back to original message]
|