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

Class: Net_DNSBL

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

Class Overview


PEAR::Net_DNSBL


Author(s):

Version:

  • Release: 1.3.7

Variables

Methods


Child classes:

Net_DNSBL_SURBL
PEAR::Net_DNSBL_SURBL

Inherited Variables

Inherited Methods


Class Details

[line 52]
PEAR::Net_DNSBL

This class acts as interface to DNSBLs

Net_DNSBL looks up an supplied IP if it's listed in a DNS Blacklist.



[ Top ]


Class Variables

$blacklists = array('sbl-xbl.spamhaus.org',
                                  'bl.spamcop.net')

[line 63]

Array of blacklists.

Must have one or more elements.

  • Access: protected

Type:   array


[ Top ]

$results = array()

[line 72]

Array of Results
  • Access: protected

Type:   array


[ Top ]



Method Detail

buildLookUpHost   [line 311]

string buildLookUpHost( string $ip, string $blacklist)

Build the host to lookup from an IP.
  • Return: Ready to use host to lookup
  • Access: protected

Parameters:

string   $ip   —  IP to use for building the lookup.
string   $blacklist   —  Blacklist to use for building the lookup.

[ Top ]

getBlacklists   [line 98]

array getBlacklists( )

Get the blacklists.
  • Return: Currently set blacklists.
  • Access: public

[ Top ]

getDetails   [line 112]

array getDetails( string $host)

Returns Blacklist and Reply from the Blacklist, a host is listed in.
  • Return: result. $result['dnsbl'] contains DNSBL, $result['record'] contains returned DNS record.
  • Access: public

Parameters:

string   $host   —  Host to check

[ Top ]

getHostForLookup   [line 284]

string getHostForLookup( string $host, string $blacklist)

Get host to lookup. Lookup a host if neccessary and get the complete FQDN to lookup.
  • Return: Ready to use host to lookup
  • Access: protected

Overridden in child classes as:

Net_DNSBL_SURBL::getHostForLookup()
Get Hostname to ask for.

Parameters:

string   $host   —  Host OR IP to use for building the lookup.
string   $blacklist   —  Blacklist to use for building the lookup.

[ Top ]

getListingBl   [line 129]

bl, getListingBl( string $host)

Returns Blacklist, host is listed in.
  • Return: a host is listed in or false
  • Access: public

Parameters:

string   $host   —  Host to check

[ Top ]

getListingBls   [line 155]

array getListingBls( string $host)

Returns Blacklists, host is listed in. isListed() must have been called with checkall = true
  • Return: blacklists, a host is listed in or false
  • Access: public

Parameters:

string   $host   —  Host to check

[ Top ]

getListingRecord   [line 178]

bl, getListingRecord( string $host)

Returns result, when a host is listed.
  • Return: a host is listed in or false
  • Access: public

Parameters:

string   $host   —  Host to check

[ Top ]

getTxt   [line 195]

array getTxt( string $host)

Returns TXT-Records, when a host is listed.
  • Return: TXT-Records for this host
  • Access: public

Parameters:

string   $host   —  Host to check

[ Top ]

isListed   [line 216]

boolean isListed( string $host, [boolean $checkall = false])

Checks if the supplied Host is listed in one or more of the RBLs.
  • Return: true if the checked host is listed in a blacklist.
  • Access: public

Parameters:

string   $host   —  Host to check for being listed.
boolean   $checkall   —  Iterate through all blacklists and return all A records or stop after the first hit?

[ Top ]

reverseIp   [line 325]

string reverseIp( string $ip)

Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127. Currently only works for v4-adresses
  • Return: Reversed IP
  • Access: protected

Parameters:

string   $ip   —  IP address to reverse.

[ Top ]

setBlacklists   [line 82]

bool setBlacklists( array $blacklists)

Set the blacklist to a desired blacklist.
  • Return: true if the operation was successful
  • Access: public

Parameters:

array   $blacklists   —  Array of blacklists to use.

[ Top ]


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