Research on preventing external post submission
I studied the old topic again today:
At present, I think there is only one effective method, picture verification code.
Several other methods that don’t work:
1. Determine HTTP_REFERER. In fact, this information is sent by the browser to the server, so it can be simulated
2. Judge the session code as follows:
session_start();
if(isset($_POST['name']) && !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/629756.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629756.htmlTechArticleThe old topic of research on preventing external post submissions was studied again today: At present, I think there is only one effective way. , picture verification code. Several other methods that don't work: 1...