Net_DNSBL
[ class tree: Net_DNSBL ] [ index: Net_DNSBL ] [ all elements ]

Class: Net_DNSBL_SURBL

Source Location: /Net_DNSBL-1.3.7/Net/DNSBL/SURBL.php

Class Overview

Net_DNSBL
   |
   --Net_DNSBL_SURBL

PEAR::Net_DNSBL_SURBL


Author(s):

Version:

  • Release: 1.3.7

Variables

Methods


Inherited Variables

Inherited Methods

Class: Net_DNSBL

Net_DNSBL::buildLookUpHost()
Build the host to lookup from an IP.
Net_DNSBL::getBlacklists()
Get the blacklists.
Net_DNSBL::getDetails()
Returns Blacklist and Reply from the Blacklist, a host is listed in.
Net_DNSBL::getHostForLookup()
Get host to lookup. Lookup a host if neccessary and get the complete FQDN to lookup.
Net_DNSBL::getListingBl()
Returns Blacklist, host is listed in.
Net_DNSBL::getListingBls()
Returns Blacklists, host is listed in. isListed() must have been called with checkall = true
Net_DNSBL::getListingRecord()
Returns result, when a host is listed.
Net_DNSBL::getTxt()
Returns TXT-Records, when a host is listed.
Net_DNSBL::isListed()
Checks if the supplied Host is listed in one or more of the RBLs.
Net_DNSBL::reverseIp()
Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127. Currently only works for v4-adresses
Net_DNSBL::setBlacklists()
Set the blacklist to a desired blacklist.

Class Details

[line 54]
PEAR::Net_DNSBL_SURBL

This class acts as interface to the SURBL - Spam URI Realtime Blocklists.

Services_SURBL looks up an supplied URI if it's listed in a Spam URI Realtime Blocklists.



[ Top ]


Class Variables

$blacklists = array('multi.surbl.org')

[line 65]

Array of blacklists.

Must have one or more elements.

  • Access: protected

Type:   string[]
Overrides:   Array


[ Top ]

$doubleCcTldFile =  'http://george.surbl.org/two-level-tlds'

[line 78]

File containing whitelisted hosts.

There are some whitelisted hosts (co.uk for example). This requires the package to not ask the domain name but the host name (spammer.co.uk instead of co.uk).

  • See: $twoLevelCcTld
  • Access: protected

Type:   string


[ Top ]



Method Detail

getHostForLookup   [line 136]

string getHostForLookup( string $uri, string $blacklist)

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.

  • Return: Host to lookup
  • Access: protected

Overrides Net_DNSBL::getHostForLookup() (Get host to lookup. Lookup a host if neccessary and get the complete FQDN to lookup.)

Parameters:

string   $uri   —  URL to check.
string   $blacklist   —  Blacklist to check against.

[ Top ]

isDoubleCcTld   [line 88]

boolean isDoubleCcTld( string $fqdn)

Check if the last two parts of the FQDN are whitelisted.
  • Return: True if the host is whitelisted
  • Access: protected

Parameters:

string   $fqdn   —  Host to check if it is whitelisted.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.