This is a little code example that will validate an email address in two ways:- first the general syntax of the string is checked with a regular expression- then the domain substring (after the '@') is checked using the 'checkdnsrr' function

fox dot 69 at gmx dot net: I wonder where you got this code from. I have written this piece of code half a year ago and released it WITH a copyright header that is missing now! Anyways... this code is to be considered licenced "as-is", however it'd be nice to keep the authors note (This is something about reputation, you see?). Thanks.

(Much) more recent version of it:<?phpfunction is_blacklisted($ip) {// written by satmd, do what you want with it, but keep the author please$result=Array();$dnsbl_check=array("bl.spamcop.net","list.dsbl.org","sbl.spamhaus.org"); if ($ip) {$quads=explode(".",$ip);$rip=$quads[3].".".$quads[2].".".$quads[1].".".$quads[0]; for ($i=0; $i<count($dnsbl_check); $i++) { if (checkdnsrr($rip.".".$dnsbl_check[$i].".","A")) {$result[]=Array($dnsbl_check[$i],$rip.".".$dnsbl_check[$i]); } } return $result; }}?>

Beware that this code's signature differs from the original! I also removed osirusoft as its results are not useful anyways (false positives!). Please make sure that you have nscd or a caching dns server running as this code is prone to (d)dos! Only use it in places where it is necessary (when data is to be modified), e.g. the script processing uploads/posts/replies in a blog.