I gave it a try, but didn't completly understand the code, however simple it may be

. I don't know too much about php yet

.
It probably doesn't make too much differene, but I I guess should have said that I wanted to ban the last 2 ranges 123.123.*.* . But when I modified the code, I couldn't get it to work properly. I'm pretty sure it was something I was doing wrong and not the actual code.
I ended up doing it like this:
PHP Code:
<?php
$ban_range_low=ip2long("217.234.1.1");
$ban_range_up=ip2long("217.234.255.255");
$ip=ip2long($HTTP_SERVER_VARS["REMOTE_ADDR"]);
if ($ip>$ban_range_low && $ip<$ban_range_up)
{
print "Banned";
exit();
}
?>
Thanks for your help though sde, much appreciated
