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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn