欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php判斷正常訪問和外部訪問的示例

 更新時間:2014年02月10日 15:16:58   作者:  
這篇文章主要介紹了php判斷正常訪問和外部訪問的方法,需要的朋友可以參考下
php判斷正常訪問和外部訪問
復(fù)制代碼 代碼如下:

<?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;
?>
<form method="post" action="">
<input type="text" name="name"/>
<input type="text" name="check" value="<?=$token;?>">
<input type="submit">

相關(guān)文章

最新評論