Gonzalez Posted September 7, 2009 Report Posted September 7, 2009 if (!function_exists("checkdnsrr")){ function checkdnsrr($host, $type="") { if (!empty($host)) { if ($type == "") $type = "MX"; @exec("nslookup -type=" . $type . " " . $host, $output); while (list($k, $line) = each($output)) { if (eregi("^" . $host, $line)) return true; } return false; } }}function check_email($e){ if ((preg_match("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/", $e)) || (preg_match("/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/", $e))) { $h = explode('@', $e); if (checkdnsrr($h[1] . '.', "MX")) return true; if (checkdnsrr($h[1] . '.', 'A')) return true; if (checkdnsrr($h[1] . '.', "CNAME")) return true; } return false;}if (check_email("webmsater@nasa.gov")) spam("webmaster@nasa.gov"); // spam() not included in this snippet. Quote