Message Board

http:BL Use/Development

Older Posts ]   [ Newer Posts ]
 http:bl query problem
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);
 
 Re: http:bl query problem
Author: C.Visser   (7 Jan 09 10:11pm)
Hello.

From what I have just read at

http://au.php.net/gethostbyname

gethostbyname "Returns the IP address or a string containing the unmodified hostname on failure. "


Colin
 
 Re: http:bl query problem
Author: A.Scaresbrook   (8 Jan 09 5:32am)
Hi

Thanks Colin. The code (see above) works today. So, I'm not going completely round the bend.

Alec



do not follow this link

Privacy Policy | Terms of Use | About Project Honey Pot | FAQ | Cloudflare Site Protection | Contact Us

Copyright © 2004–25, Unspam Technologies, Inc. All rights reserved.

contact | wiki | email