Guys, make in your www folder one file with name .htaccess and type that in him:
Code:
Order Allow,Deny
Allow from all
Deny from 127.0.0.1
where 127.0.0.1 is the ip who want to get ban!
Or try other method ;)
make one file called banned as .php and type this in him :
Code:
<?PHP
$banned_ip = '127.0.0.1';
$guest_ip = $_SERVER['REMOTE_ADDR'];
if($guest_ip == $banned_ip)
{
die("You have been banned from this page, contact administrator");
**
?>
where 127.0.0.1 => victim ip
or if u want to ban many ips write this in your php file:
Code:
<?PHP
$banned_ips = ("127.0.0.1,127.0.0.2");
$guest_ip = $_SERVER['REMOTE_ADDR'];
$ip_list = explode(",", $banned_ips);
foreach($ip_list as $ip)
{
if($guest_ip == $ip)
{
die("You have been banned from this page, contact administrator!");
****
?>
where 127.0.0.1.127.0.0.2 it's victim's ips so u can put many separed with , !
now if u want to include this php file in index page write in
news.php or what page it's first , at first line :
Code:
<?
include('banned.php');
?>
attention if u use MuToolz 2.1F the first lines is:
Code:
<?PHP
//ob_start("ob_gzhandler");
define ("_LOCATION",dirname(__FILE__) . "/");
require(_LOCATION.'_libs/header.php');
if (isset($_GET['read'])) {
...
set following :
Code:
<?PHP
include('banned.php');
//ob_start("ob_gzhandler");
define ("_LOCATION",dirname(__FILE__) . "/");
require(_LOCATION.'_libs/header.php');
if (isset($_GET['read'])) {
That's All