- only 1 click per IP per 24 hours logged - first general level of filtering
- useragent check against spider list - to filter out logging from most bots
- link targerts - only clicks from specified referer domains are logged
I found a simple php function that checks against SORBS.net (although the urls seem out dated now), as well as an article on PHPpot (honey trap for bots).
Code:
function check_rbl() {
$rbls = array('http.dnsbl.sorbs.net', 'misc.dnsbl.sorbs.net');
$remote = $_SERVER['REMOTE_ADDR'];
if(preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/", $remote, $matches)) {
foreach ($rbls as $rbl) {
$rblhost = $matches[4] . "." . $matches[3] . "." . $matches[2] . "." . $matches[1] . "." . $rbl;
$resolved = gethostbyname($rblhost);
if ($resolved != $rblhost) {
return true;
}
}
}
return false;
}




Linear Mode

