Файл: anifun.ru/files/anti_ddos.php
Строк: 15
<?php
############################################
## By Holopsicon
## https://psgame.net
############################################
##Модуль внутри игрового антифлуда.
############################################
$rst = DB::$dbs->queryFetch("SELECT * FROM `antiddos` WHERE `ip` = ? and `potok` > ? and `time` = ? LIMIT 1",array($ip,2,$time_t));
if (!empty($rst)) {
DB::$dbs->query("DELETE FROM `antiddos` WHERE `ip` = ? ", array($ip));
?>Не так быстро<? echo' <a href="https://'.$_SERVER[HTTP_HOST].''.$_SERVER[REQUEST_URI].'">продолжить</a>';include_once"files/d_one.php";exit;
}
$st = DB::$dbs->queryFetch("SELECT * FROM `antiddos` WHERE `ip` = ? and `time` = ? LIMIT 1",array($ip,$time_t));
if (empty($st)) {
DB::$dbs->query("DELETE FROM `antiddos` WHERE `ip` = ? ", array($ip));
DB::$dbs->query("INSERT INTO `antiddos` (`ip`, `potok`, `time`) VALUES (?, ?, ?)", array($ip, 1, $time_t));
}else
if (!empty($st)) {
$st[potok]=$st[potok]+1;
DB::$dbs->query("UPDATE `antiddos` SET `potok` = ? WHERE `ip` = ? ", array($st[potok], $ip));
}
?>