Location: PHPKode > scripts > URI Reputation > uri_reputation.html
<meta name="distribution" content="global">
<!-- anti spam -->
<meta name="version" content="3">
<meta name="author" content="(T. R. Shaw) tshaw at oitc.com">
<meta name="copyright" content="This document copyright 2009-2011 by OITC and T. R. Shaw. All rights reserved."> 
<meta name="description" content="URI Reputation Client.">
<meta name="keywords" content="ANTI,ANTISPAM,SPAM,URL,URI Reputation Client,SURBL,URIBL,Spamhaus DBL">
<script language="JavaScript1.1" SRC="http://www.oitc.com/Disney/JavaScripts/PageFunctions.js"></script>
<title>URI Reputation Client</title>
<style type="text/css">
                BODY { FONT-FAMILY: Verdana, Helvetica, Arial }
                p { FONT-FAMILY: Verdana, Helvetica, Arial }
                br { FONT-FAMILY: Verdana, Helvetica, Arial }
                h1 { FONT-FAMILY: Verdana, Helvetica, Arial }
                h2 { FONT-FAMILY: Verdana, Helvetica, Arial }
                h3 { FONT-FAMILY: Verdana, Helvetica, Arial }
                td { FONT-FAMILY: Verdana, Helvetica, Arial }
                th { FONT-FAMILY: Verdana, Helvetica, Arial }

<body TEXT="#FFFFFF" BGcolor="#080839" LINK="#FF8000" VLINK="#FF9900" ALINK="#FFFF00">

<table BORDER="0" WIDTH="100%">
		<tg WIDTH="100%" align="CENTER">
			<h1 align="CENTER"><font face="Verdana, Helvetica, Arial">URI Reputation Client<br><font color=yellow size="2">in php for SURBL and other URI Reputation DNSbl's</font></font></h1>

<hr width="60%">
<!--<DIV {position: absolute; left: 4px}-->
<span style="float:right">
<!-- BEGIN RICH-MEDIA Burst Media CODE -->
<script type="text/javascript" language="JavaScript">
rnum=Math.round(Math.random() * 100000);
if (window.self != window.top) {nf=''} else {nf='NF/'};
document.write(ts+'script src="http://www.burstnet.com/cgi-bin/ads/ad1287a.cgi/v=2.3S/sz=120x600A|160x600A|300x600A/'+rnum+'/'+nf+'RETURN-CODE/JS/">'+ts+'/script>');
</script><noscript><a href="http://www.burstnet.com/ads/ad1287a-map.cgi/ns/v=2.3S/sz=120x600A|160x600A|300x600A/" target="_top">
<img src="http://www.burstnet.com/cgi-bin/ads/ad1287a.cgi/ns/v=2.3S/sz=120x600A|160x600A|300x600A/" border="0" alt="Click Here" /></a>
<!-- END Burst Media CODE -->
<h2><font color=lightblue>Summary</font></h2>
The URI Reputation Client is a PHP5 object that can be used to check the reputation of a URL using data from SURLB.ORG and other similar systems such as URIBL.COM and SPAMHAUS.ORG's DBL.  <p>
The URI Reputation Client is released under the The MIT Open Source License<p>

<h2><font color=lightblue>Usage</font></h2>
 			include_once("uri_reputation.php");<p />
 			$surbl = new URIReputation();<br />
 			if ($surbl->check_url($url_to_be_checked) === false) not_found;<br />
 			else found_on_one_or_more_lists;<br />
 			include_once("uri_reputation.php");<p />
 			$surbl = new URIReputation();<br />
 			switch ($surbl->check_url($url_to_be_checked)) {<br />
 				case "":<br />
 					found_on_sc.surbl.org<br />
 					break;<br />
 				case "":<br />
 					found_on_ws.surbl.org<br />
 					break;<br />
 				case "":<br />
 					found_on_ph.surbl.org<br />
 					break;<br />
 				case "":<br />
 					found_on_ob.surbl.org<br />
 					break;<br />
 				case "":<br />
 					found_on_ab.surbl.org<br />
 					break;<br />
 				case "":<br />
 					found_on_jp.surbl.org<br />
 					break;<br />
 				case false:<br />
 					not_found<br />
 					break;<br />
 				default:<br />
 					found_on_multiple_lists<br />
 					break;<br />
 			}<br />
 			include_once("uri_reputation.php");<p />
 			$surbl = new URIReputation();<br />
 			$result = ip2long($surbl->check_url($url_to_be_checked));<br />
 			if (($result > 0x7f000001) && ($result <= 0x7f00ffff)) {<br />
 				// URL detected on 1 or more lists<br />
 				$found_on_sc_surbl_org = ($result & 2);<br />
 				$found_on_ws_surbl_org = ($result & 4);<br />
 				$found_on_ph_surbl_org = ($result & 8);<br />
 				$found_on_ob_surbl_org = ($result & 16);<br />
 				$found_on_ab_surbl_org = ($result & 32);<br />
 				$found_on_jp_surbl_org = ($result & 64);<br />
 			} else {<br />
 				// URL not found on any lists<br />
 			}<br />
<h2><font color=lightblue>Requirements</font></h2>
PHP5<p />
Additionally, support files are required for proper operation. They can be downloaded directly from <a href="http://www.surbl.org/guidelines">SURBL</a>. You need to download both the <a href="http://www.surbl.org/tld/two-level-tlds">two-level-tlds</a> file and the 
<a href="http://www.surbl.org/tld/three-level-tlds">three-level-tlds</a> file.<p />The files should be checked to be current periodically -
 maybe once per week.

<h2><font color=lightblue>Download</font></h2>
Source code for the URI Reputation Client can be downloaded <a href="http://www.oitc.com/source/uri_reputation.zip">here</a>.

<h2><font color=lightblue>Support/Feedback</font></h2>
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 
<script language="JavaScript" type="text/javascript">
</script><noscript><i>support at oitc.com</i></noscript>

<hr TITLE="Line Separator" size=4>
<font face="Verdana, Helvetica, Arial" color=grey><i>Web page &copy;2009-2011 by OITC. All rights Reserved, USA and Worldwide</i><br />For Web page problems contact 
<script language="JavaScript" type="text/javascript">
</script><noscript><i>webmaster at oitc.com</i></noscript>
Return current item: URI Reputation