Author: A.Scaresbrook (7 Jan 09 8:09am)
Hi
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 = '88.17.16.12';
// Build the lookup
$lookup = $apikey . "." . implode('.', array_reverse(explode ('.', $ip))) . '.dnsbl.httpbl.org';
print_r($lookup);
echo "<br />";
$result = gethostbyname($lookup);
print_r($result);
|