Home > php教程 > php手册 > php判断正常访问和外部访问的示例

php判断正常访问和外部访问的示例

WBOY
Release: 2016-06-13 09:43:33
Original
1133 people have browsed it

php判断正常访问和外部访问

复制代码 代码如下:


session_start();
if(isset($_POST['check'])&&!empty($_POST['name'])){
if($_POST['check'] == $_SESSION['check']){
echo "正常访问";
}else{
echo "外部访问";
}
}
$token = md5(uniqid(rand(),true));
$_SESSION['check'] = $token;
?>





Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template