PHP determines normal access and external access
Copy code The code is as follows:
session_start();
if(isset($_POST['check'])&&!empty($_POST['name'])){
if($_POST['check'] == $_SESSION['check'] ){
echo "Normal access";
}else{
echo "External access";
}
}
$token = md5(uniqid(rand(),true) );
$_SESSION['check'] = $token;
?>
http://www.bkjia.com/PHPjc/732388.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/732388.htmlTechArticlephp determines normal access and external access. Copy the code code as follows: ?php session_start(); if(isset($_POST ['check'])!empty($_POST['name'])){ if($_POST['check'] == $_SESSION['check']){ ec...