RE: [PHP] email varification

From: Date: Tue, 17 Oct 2000 09:21:53 +0000
Subject: RE: [PHP] email varification
Groups: php.general 
Request: Send a blank email to php-general+get-20584@lists.php.net to get a copy of this message
Well, for sure I dropped your email in my 'COOL STAFF' folder :-)) why don't you add a note on php.net under eregi function? we can all link people there... easy isn't it? and useful. Cheers! :-)) -----Original Message----- From: Wico de Leeuw [mailto:wico@cnh.nl] Sent: Tuesday, October 17, 2000 6:28 PM To: Dallas Kropka; PHP LIST Subject: Re: [PHP] email varification Hiya function Validate_Domain ($domain) { return(preg_match("'^(?:[a-z_0-9-]+[\.]{1})*(?:[a-z_0-9-]+\.)[a-z]{2,3}$'i", $domain)); } function Validate_Email ($email) { return(preg_match("'^[a-z0-9_.=-]+@(?:[a-z0-9-]+\.)+([a-z]{2,3})\$'i", $email)); } function Validate_Url ($url) { return(preg_match("'^[^:]+://(?:[a-z_0-9-]+[\.]{1})*(?:[a-z_0-9-]+\.)[a-z]{2 ,3}.*$'i", $url)); } P.S. Could someone put these functions I created in a FAQ or something this is the 10th time i put those on the list for someone asking Greetz, Wico At 03:55 17-10-00 -0700, Dallas Kropka wrote: >this code is returning 1 (ie bad email) for any email.... any idea why? Id >dosent seem to ever go into the first if statement. > >if >(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $emailaddress, >$check)) > { > if ( getmxrr(substr(strstr($check[0], '@'), 1), > $validate_email_temp)) > { > return 0; > } > > else > { > return 1; > } > } > > else > { > return 1; > } > >it seems to get into the statement, then proceds to the first else when >the email is "really" good, and the second else when it is bad.... but the >if (getmx....... never gets evaluated, could someone please help ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#20584) next »