无限星辰工作室-客户无限互联网动力之源
标题:
简单的CC防护函数(PHP)
[打印本页]
作者:
crx349
时间:
2013-6-26 09:31
标题:
简单的CC防护函数(PHP)
$P_S_T = $t_array[0] + $t_array[1];
$timestamp = time();
session_start();
$ll_nowtime = $timestamp ;
if ($_SESSION('ll_lasttime')==null){
$ll_lasttime = $_SESSION['ll_lasttime'];
$ll_times = $_SESSION['ll_times'] + 1;
$_SESSION['ll_times'] = $ll_times;
}else{
$ll_lasttime = $ll_nowtime;
$ll_times = 1;
$_SESSION['ll_times'] = $ll_times;
$_SESSION['ll_lasttime'] = $ll_lasttime;
}
if (($ll_nowtime - $ll_lasttime)<3){
if ($ll_times>=5){
header(sprintf("Location: %s",‘http://*.xmspace.net’));
exit;
}
}else{
$ll_times = 0;
$_SESSION['ll_lasttime'] = $ll_nowtime;
$_SESSION['ll_times'] = $ll_times;
}
复制代码
3表示时间间隔,5表示刷新次数,超过设定值,立即跳转
欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://xmspace.net/)
Powered by Discuz! X3.4