function blacklisted($ip)
{
if ($this->hive['DNSBL'] && !in_array($ip, is_array($this->hive['EXEMPT']) ? $this->hive['EXEMPT'] : $this->split($this->hive['EXEMPT']))) {
// Reverse IPv4 dotted quad
$rev = implode('.', array_reverse(explode('.', $ip)));
foreach (is_array($this->hive['DNSBL']) ? $this->hive['DNSBL'] : $this->split($this->hive['DNSBL']) as $server) {
// DNSBL lookup
if (checkdnsrr($rev . '.' . $server, 'A')) {
return TRUE;
}
}
}
return FALSE;
}