Trying to implement the following php script that i found at php.net. My question how to mod the following script so that it redirects the users to index.php page if it is found that the ip is black listed.
$result=Array();
$dnsbl_check=array("bl.spamcop.net",
"list.dsbl.org",
"sbl.spamhaus.org");
if ($ip)
{
$quads=explode(".",$ip);
$rip=$quads[3].".".$quads[2].".".$quads.".".$quads[0];
for ($i=0; $i<count($dnsbl_check); $i++)
{
if (checkdnsrr($rip.".".$dnsbl_check[$i].".","A"))
{
$result1[]=Array($dnsbl_check[$i],$rip.".".$dnsbl_check[$i]);
}
}
}
$result=Array();
$dnsbl_check=array("bl.spamcop.net",
"list.dsbl.org",
"sbl.spamhaus.org");
if ($ip)
{
$quads=explode(".",$ip);
$rip=$quads[3].".".$quads[2].".".$quads.".".$quads[0];
for ($i=0; $i<count($dnsbl_check); $i++)
{
if (checkdnsrr($rip.".".$dnsbl_check[$i].".","A"))
{
$result1[]=Array($dnsbl_check[$i],$rip.".".$dnsbl_check[$i]);
}
}
}