Dismounted
59.***.***.***IP Banner
IP Banner This will ban certain IP's from accessing your site. Make a new file called "ipban.php" and insert this code:PHP code:
<?php function ip_check() { // IP's to Block if ( in_array($_SERVER['REMOTE_ADDR'], $block_ip) ) { return false; } else { return true; } } ?>
To add a new IP, just type under "// IP's to Block":PHP code:
$block_ip[] = 'ip.address.to.block';
Replace "ip.address.to.block" with the IP. You can do this as many times as you want. To make it work, add this to the top of pages you want to activate bans.PHP code:
<?php include 'ipban.php'; if ( !ip_check() ) { die ('Your IP is been banned.'); } ?>
That should be it! :)