Code: Select all
<?
$ip = $_SERVER['REMOTE_ADDR'];
$adresi = array ("80.77.159.1","80.77.159.2","80.77.159.3","80.77.159.4","62.162.50.254","62.162.50.255");
$n = 0;
for($x=0;$x<count($adresi);$x++)
{
if ( $ip == $adresi[$x])
{ $n = 1 ;}
}
if ($n == 1)
{ echo "";}
else { header('Location:http://www.url.com');}
?>
As you see there are certain ip classes added in that file, What I need to do is add 2 or more classes such as: "88.85.112.1 til 250" and 88.85.113.1 til 250. Adding manually will be hell alot of time, do you think is there any other solution forit?.. do you think a TCL could do that for me?.. which will add ips alongwith "88.85.112.1","88.85.112.2" and so on.. I am attaching the original file here as well.
File
Your kind suggestions will be highly appreciated
Thanks
iamdeath
Forgive me for going out of topic.