First Make A file banned.txt
leave banned.txt blank
goto banautotest.php
==========
كود PHP:
<?php
$list = explode("\r\n", file_get_contents("banned.txt"));
for($index = 0; $index < count($list); $index++)
{
if($list[$index] == $_SERVER["REMOTE_ADDR"])
{
header("Location: banned.php");
}
}
$logfile= 'banned.txt';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails = $_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
header("location: banned.php");
?>
============
Banned.php
كود PHP:
<?php
echo "You Have Been Banned";
?>
===============
U can put this in any file you want to block from someone if they are banned
===========
كود PHP:
<?php
<?php
$list = explode("\r\n", file_get_contents("banned.txt"));
for($index = 0; $index < count($list); $index++)
{
if($list[$index] == $_SERVER["REMOTE_ADDR"])
{
header("Location: banned.php");
}
}
?>
==================
Or this in a file itself just to ban the person. When they goto it
==========
كود PHP:
<?php
$logfile= 'banned.txt';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails = $_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
header("location: banned.php");
?>
========
Banned.php
كود PHP:
<?php
echo "You Have Been Banned";
?
>