I\'d like, for example, block every IP from base 89.95 (89.95..).
I don\'t have .htaccess
files on my server, so I\'ll have to do it with PHP.
using revive's code, use this to get wildcard search working
// Now let's search if this IP is blackliated
$status = false;
foreach($denied_ips as $val)
{
if (strpos($val,'*') !== false)
{
if(strpos($visitorIp, array_shift(explode("*", $val))) === 0)
{
$status = true;
break;
}
}
else
{
if(strcmp($visitorIp, $val) === 0)
{
$status = true;
break;
}
}
}