Usage
DNS
PHP
More coming soon!
DNS
To check the status of the IP 1.2.3.4, query the blacklist as:
4.3.2.1.list.blogspambl.com
If the IP is listed there will be an A record response with the IP 127.0.0.2 and a TXT record response with a link to the lookup page.
PHP
A few lines for PHP:
$clientip = explode(".", $_SERVER["REMOTE_ADDR"]);
$revip = array_reverse($clientip);
$query = implode(".", $revip) . ".list.blogspambl.com";
$result = explode(".", gethostbyname($query));
if ($result[0] == 127) {
// Blocked IP handling code goes here
echo "Blocked!";
}