Here is a code that will ban users with the specified ip, or multiple IP's in PHP, this goes at the very top if you want to prevent them from viewing:
1. Single IP:
<a href="http://ipost2host.com/viewtopic.php?f=14&t=1719#" target="_blank">
</a>
Code:
<?php
function block_ip($ip){
if (substr($_SERVER[&#39;REMOTE_ADDR&#39;], 0, strlen($ip)) == $ip){
return true;
} else {
return false;
}
}
// check if ip is blocked
 
if (block_ip("123.456.789.987")){
echo &#39;go away&#39;;
exit;
}
?>
Block IP range:
<a href="http://ipost2host.com/viewtopic.php?f=14&t=1719#" target="_blank">
</a>
Code:
<?php
function block_ip($ip){
if (substr($_SERVER[&#39;REMOTE_ADDR&#39;], 0, strlen($ip)) == $ip){
return true;
} else {
return false;
}
}
 
// check if ip is blocked
 
if (block_ip("123.456.") or block_ip("123.457.")){
echo &#39;go away&#39;;
exit;
}
?>
Instead of blocking 1, you can lso use this instead of if:
<a href="http://ipost2host.com/viewtopic.php?f=14&t=1719#" target="_blank">
</a>
Code:
if (block_ip("123.456.") or block_ip("123.457.")){
notice how it has an or then the same code again, so you may block mulitle IP addresses