Re: how do I check for this

From: Date: Tue, 17 Oct 2000 07:41:04 +0000
Subject: Re: how do I check for this
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20560@lists.php.net to get a copy of this message
Keep in mind that the below won't check for valid accounts on boxes - just for valid "looking" email addresses. I personally have qmail set up on a PHP mailing list I made to process a PHP script on all bounced emails - this then updates the database accordingly. Of course from the looks of it you are running windows (ie H:\) so qmail is not really an alternative (but Linux/FreeBSD is ;o) --Joe On Tue, Oct 17, 2000 at 06:36:07PM +1000, Jason Murray wrote: > > Is there a simple function for validating emails? > > Function validEmail($emailaddress) > { > // Validates the email address. I guess it works. *shrug* > 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 "valid"; } > else > { return "invalid-mx"; } > } > else > { > return "invalid-form"; > } > } > > This one's working for me. > > Jason > > -- > 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 /*****************************\ * Joe Stump * * www.Care2.com * * Office: 650.328.0198 * * Extension: 122 * \*****************************/ http://www.miester.org/Joe/Stump/Joe_Stump_resume.html -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$ N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@ 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)! ------END GEEK CODE BLOCK------

« previous php.general (#20560) next »