<?php
session_start();
$falsenum=isset($_SESSION['f_num'])?intval($_SESSION['f_num']):0;
$cc_t=isset($_SESSION['cc_t'])?intval($_SESSION['cc_t']):0;
$cc_l=isset($_SESSION['cc_l'])?intval($_SESSION['cc_l']):0;
if($falsenum>3){
die('您的IP已被禁止访问');
}
if((time() - $cc_l)<5){
if ($cc_t>=10){
$_SESSION['f_num']=$falsenum+1;
die('请不要重复刷新');
exit;
}else{
$_SESSION['cc_t']=$cc_t+1;
}
}else{
$_SESSION['cc_l'] = time();
$_SESSION['cc_t'] = 0;
}
?>
灰常不确定这种方法有木有用,貌似肉鸡多点的话,该怎么死还是怎么死!
求完善,求点评~