[ PHPXref.com ] [ Generated: Sun Jul 20 20:14:57 2008 ] [ Serendipity 0.9.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/bundled-libs/Net/DNSBL/ -> SURBL.php (summary)

PEAR::Net_DNSBL_SURBL

Author: Sebastian Nohn
License: http://www.php.net/license/3_0.txt
Version: 0.5.4
File Size: 164 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Net_DNSBL_SURBL:: (2 methods):
  isDoubleCcTld()
  getHostForLookup()


Class: Net_DNSBL_SURBL  - X-Ref

isDoubleCcTld($fqdn)   X-Ref
Check if the last two parts of the FQDN are whitelisted.

param: string Host to check if it is whitelisted
return: boolean True if the host is whitelisted

getHostForLookup($uri, $blacklist)   X-Ref
Get Hostname to ask for.

Performs the following steps:

(1) Extract the hostname from the given URI
(2) Check if the "hostname" is an ip
(3a) IS_IP Reverse the IP (1.2.3.4 -> 4.3.2.1)
(3b) IS_FQDN Check if is in "CC-2-level-TLD"
(3b1) IS_IN_2LEVEL: we want the last three names
(3b2) IS_NOT_2LEVEL: we want the last two names
(4) return the FQDN to query.

param: string URL to check.
return: string Host to lookup



[ Powered by PHPXref - Served by Debian GNU/Linux ]