Author: A.Scaresbrook (7 Jan 09 8:09am)
The problem is that the query (see below) just doesn't work and I can't see why.
The query string in $lookup looks correct. My api is correct and is active. The ip to be tested is a known bad boy.
The value returned in $result is the same as the value that went in, in $lookup.
Does anyone know what's wrong here?
// your http:BL key
$apikey = 'abcdefghijklmnop';
// IP to test : your visitor's
$ip = '220.127.116.11';
// Build the lookup
$lookup = $apikey . "." . implode('.', array_reverse(explode ('.', $ip))) . '.dnsbl.httpbl.org';
echo "<br />";
$result = gethostbyname($lookup);