Message Board

http:BL Use/Development

Older Posts ]   [ Newer Posts ]
 Using http:BL on ASP (active server pages)
Author: S.Jung2   (9 Jun 13 10:37am)
Hi,

I have some pages running with older "classical" ASP code.

Is there a way to perform this PHP script also in my ASP pages?

function httpbl_check() {
global $httpblkey, $httpblmaxdays, $httpblmaxthreat, $httpblhoneypot;

$ip = $_SERVER["REMOTE_ADDR"];

$result = explode(".", gethostbyname($httpblkey."."
.implode(".", array_reverse(explode(".", $ip)))
.".dnsbl.httpbl.org"));

if ($result[0] != 127) {
//something went wrong or the IP is not in the database.
//ignore this one.
return;
}

$days = $result[1];
$threat = $result[2];

if ($days < $httpblmaxdays && $threat > $httpblmaxthreat) {
if ($httpblhoneypot) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$httpblhoneypot);
}
die();
}
}
httpbl_check();


Thanks for your feedback.

BR
Steffen



do not follow this link

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

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

contact | wiki | email