Copy code The code is as follows:
session_start();
$k=$_GET[' k'];
$t=$_GET['t'];
$allowTime = 1800;//anti-refresh time
$ip = get_client_ip();
$allowT = md5($ ip.$k.$t);
if(!isset($_SESSION[$allowT]))
{
$refresh = true;
$_SESSION[$allowT] = time() ;
}elseif(time() - $_SESSION[$allowT]>$allowTime){
$refresh = true;
$_SESSION[$allowT] = time();
}else {
$refresh = false;
}
?>
http://www.bkjia.com/PHPjc/321927.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321927.htmlTechArticleCopy the code as follows: ?php session_start(); $k=$_GET['k']; $t =$_GET['t']; $allowTime = 1800;//Anti-refresh time $ip = get_client_ip(); $allowT = md5($ip.$k.$t); if(!isset($_SESS.. .