From: <var...@us...> - 2014-11-15 17:38:58
|
Revision: 9311 http://sourceforge.net/p/phpwiki/code/9311 Author: vargenau Date: 2014-11-15 17:38:49 +0000 (Sat, 15 Nov 2014) Log Message: ----------- PHP Doc; remove debug Modified Paths: -------------- trunk/lib/SpamBlocklist.php Modified: trunk/lib/SpamBlocklist.php =================================================================== --- trunk/lib/SpamBlocklist.php 2014-11-13 20:10:04 UTC (rev 9310) +++ trunk/lib/SpamBlocklist.php 2014-11-15 17:38:49 UTC (rev 9311) @@ -20,7 +20,7 @@ * */ -/** +/* * See http://www.surbl.org/ * * Perform a name lookup (A) for any link tld against multi.surbl.org and bl.spamcop.net, @@ -29,9 +29,12 @@ * This is the same, but a bit lighter than PEAR::Net_DNSBL_SURBL */ -/* +/** * Strip domain prefixes so that either the last two name parts are returned, * or if it's a known tld (like "co.uk") the last three. + * + * @param string $host + * @return string */ function stripDomainPrefixes($host) { @@ -58,6 +61,11 @@ return $host; } +/** + * @param string $uri + * @return int + */ + function IsBlackListed($uri) { static $blacklists = array("multi.surbl.org", "bl.spamcop.net"); @@ -98,28 +106,6 @@ return 0; } -/* -if (defined('SPAMBLOCKLIST_TEST') and SPAMBLOCKLIST_TEST) { - BlackListDebug("10.20.30.40"); - BlackListDebug("spammer.org"); - BlackListDebug("www.ricoruca.com"); - BlackListDebug("ricoruca.com"); - BlackListDebug("soft-sky.org"); - BlackListDebug("lovers.lv"); - BlackListDebug("wumort.net"); - BlackListDebug("bibleinayear.org"); - BlackListDebug("p50927464.dip.t-dialin.net"); -} -function BlackListDebug($host) { - $res = IsBlackListed($host); - echo sprintf("%12s", $host), "\tis"; - if ($res) - echo " listed at $res[0] - $res[1]\n"; - else - echo " not blacklisted.\n"; -} -*/ - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |