Update of /cvsroot/php-blog/serendipity/bundled-libs/Net
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29920/bundled-libs/Net
Modified Files:
DNSBL.php
Log Message:
updated Net_DNSBL package
bundled Cache_Lite
Index: DNSBL.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/bundled-libs/Net/DNSBL.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DNSBL.php 2 Dec 2004 10:54:29 -0000 1.3
+++ DNSBL.php 2 Dec 2004 14:23:51 -0000 1.4
@@ -30,7 +30,7 @@
* @author Sebastian Nohn <seb...@no...>
* @package Net_DNSBL
* @license http://www.php.net/license/3_0.txt
- * @version 0.3
+ * @version 0.5.3
*/
require_once 'Net/CheckIP.php';
@@ -39,8 +39,7 @@
/**
* Array of blacklists.
*
- * Contain 1-n blacklists to use for checking the status of a
- * host.
+ * Must have one or more elements.
*
* @var array
* @access protected
@@ -55,7 +54,8 @@
* @access public
* @return bool true if the operation was successful
*/
- function setRBL($blacklists) {
+ function setBlacklists($blacklists)
+ {
if (is_array($blacklists)) {
$this->blacklists = $blacklists;
return true;
@@ -70,19 +70,21 @@
* @access public
* @return array Currently set blacklists.
*/
- function getRBL() {
+ function getBlacklists()
+ {
return $this->blacklists;
}
/**
- * Checks if the supplied Host is listen in one or more of the
- * RBLs
+ * Checks if the supplied Host is listed in one or more of the
+ * RBLs.
*
* @param string Host to check for being listed.
* @access public
- * @return boolean true if the checked host is listed in some blacklist.
+ * @return boolean true if the checked host is listed in a blacklist.
*/
- function isListed($host) {
+ function isListed($host)
+ {
$isListed = false;
@@ -100,16 +102,18 @@
return $isListed;
} // function
- /**
- * Get thublice host to lookup. Lookup a host if neccessary and get the
- * complete FQDN to lookup
+ /**
+ * Get host to lookup. Lookup a host if neccessary and get the
+ * complete FQDN to lookup.
*
* @param string Host OR IP to use for building the lookup.
* @param string Blacklist to use for building the lookup.
* @access protected
* @return string Ready to use host to lookup
*/
- function getHostForLookup($host, $blacklist) {
+ function getHostForLookup($host, $blacklist)
+ {
+ // Currently only works for v4 addresses.
if (!Net_CheckIP::check_ip($host)) {
$ip = gethostbyname($host);
} else {
@@ -127,20 +131,23 @@
* @access protected
* @return string Ready to use host to lookup
*/
- function buildLookUpHost($ip, $blacklist) {
+ function buildLookUpHost($ip, $blacklist)
+ {
return $this->reverseIp($ip).'.'.$blacklist;
} // function
/**
- * Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127
+ * Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127. Currently
+ * only works for v4-adresses
*
* @param string IP to reverse.
* @access protected
* @return string Reversed IP
*/
- function reverseIp($ip) {
+ function reverseIp($ip)
+ {
return implode('.', array_reverse(explode('.', $ip)));
} // function
} // class
-?>
+?>
\ No newline at end of file
|