3) { $domain_to_test = $domain_to_test . ".multi.surbl.org."; if( gethostbyname($domain_to_test) != $domain_to_test ) { header("Location: $comment_text"); exit(); } } } return $test . $comment_text ; } function check_for_surbl2 ( $comment_url ) { /* for a full explanation, see http://www.surbl.org summary: blocks comment if it contains an url that's on a known spammers list. */ $pieces = explode('/',$comment_url); for( $cnt=0; $cnt < count($pieces); $cnt++ ) { $short_url = $pieces[$cnt]; if ($short_url != 'http') { $short_url = str_replace("www.", "", "$short_url"); if (strlen($short_url) > 3) { $domain_to_test = $short_url . ".multi.surbl.org."; if( gethostbyname($domain_to_test) != $domain_to_test ) { header("Location: $comment_url"); exit(); } } } } return $comment_url ; } add_action('pre_comment_content', 'check_for_surbl', 1); add_action('pre_comment_author_url', 'check_for_surbl2', 1); add_action('pre_comment_content', 'check_blackholes', 1); ?>