URI Reputation Client
in php for SURBL and other URI Reputation DNSbl's


Summary

The URI Reputation Client is a PHP5 object that can be used to check the reputation of a URL using data from SURBL.ORG and other similar systems such as URIBL.COM and SPAMHAUS.ORG's DBL.

The URI Reputation Client is released under the The MIT Open Source License

New for Version 1.2 is partial support of IPv6. The URI Reputation Client now handles IPv4 encapsulated in IPv6 addresses.

Usage

include_once("uri_reputation.php");

$surbl = new URIReputation();
if ($surbl->check_url($url_to_be_checked) === false) not_found;
else found_on_one_or_more_lists;

or
include_once("uri_reputation.php");

$surbl = new URIReputation();
switch ($surbl->check_url($url_to_be_checked)) {
case "127.0.0.2":
found_on_sc.surbl.org
break;
case "127.0.0.4":
found_on_ws.surbl.org
break;
case "127.0.0.8":
found_on_ph.surbl.org
break;
case "127.0.0.16":
found_on_ob.surbl.org
break;
case "127.0.0.32":
found_on_ab.surbl.org
break;
case "127.0.0.64":
found_on_jp.surbl.org
break;
case false:
not_found
break;
default:
found_on_multiple_lists
break;
}

or
include_once("uri_reputation.php");

$surbl = new URIReputation();
$result = ip2long($surbl->check_url($url_to_be_checked));
if (($result > 0x7f000001) && ($result <= 0x7f00ffff)) {
// URL detected on 1 or more lists
$found_on_sc_surbl_org = ($result & 2);
$found_on_ws_surbl_org = ($result & 4);
$found_on_ph_surbl_org = ($result & 8);
$found_on_ob_surbl_org = ($result & 16);
$found_on_ab_surbl_org = ($result & 32);
$found_on_jp_surbl_org = ($result & 64);
} else {
// URL not found on any lists
}

Requirements

PHP5

Additionally, support files are required for proper operation. They can be downloaded directly from SURBL. You need to download both the two-level-tlds file and the three-level-tlds file.

The files should be checked to be current periodically - maybe once per week.

Download

Source code for the URI Reputation Client V1.1 can be downloaded here.

Support/Feedback

The source code is pretty straight foward so not much support is anticipated. However if you need some or want to provide feedback or improvements contact


Web page ©2009-2011 by OITC. All rights Reserved, USA and Worldwide
For Web page problems contact