Message Board

http:BL Use/Development

Older Posts ]   [ Newer Posts ]
 http:bl query problem
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 = '';

// Build the lookup
$lookup = $apikey . "." . implode('.', array_reverse(explode ('.', $ip))) . '';
echo "<br />";

$result = gethostbyname($lookup);
 Re: http:bl query problem
Author: C.Visser   (7 Jan 09 10:11pm)

From what I have just read at

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

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

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


do not follow this link

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

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

contact | wiki | email