Php file:
$ipp = $_SERVER['REMOTE_ADDR']; $banlist = file("/ip.txt"); $banlist = implode("\r\n", $banlist); $ban = array($banlist); $count = count($ban); for ($il=0; $il<$count; $il++) { if($ipp == $ban[$il]) { die("Вы забанены"); } }
Ip.txt file:
'85.26.184.19', '85.28.184.19'
This script works if you do not use the ip.txt file, for example:
...код... $ban = array('85.26.184.19','85.28.184.19'); ...код...
but you need to take ipshniki from the file, help me correct the error.