function RefreshHit($parameter,$ip){ session_start(); $allowTime = 1800; $allowT = md5($ip.$parameter); if(!isset($_SESSION[$allowT])){ $refresh = true; $_SESSION[$allowT] = time(); }elseif(time() - $_SESSION[$allowT]>$allowTime){ $refresh = true; $_SESSION[$allowT] = time(); }else{ $refresh = false; } return $refresh; }