This time I will bring you a detailed explanation of php curl with csrf-token verification simulation submission example, php curl with csrf-token verification simulation submissionWhat are the precautions, the following is a practical case, one Get up and take a look.
1. Obtain the token through regular expressions
2. Bring the obtained token to simulate submission
The following is a successful example
│ form.php –需要模拟的表单 │ getForm.php – 模拟提交程序 │ post.php –表单验证程序 │ └─cookie – cookie存放目录
getForm.php
getMessage(), "\n"; } unlink($cookie_file); }
form.php
post.php
Copy after login
I believe you will read the case in this article You have mastered the method. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Detailed explanation of the use of PHP bubble sort
The above is the detailed content of Detailed explanation of php curl with csrf-token verification simulation submission example. For more information, please follow other related articles on the PHP Chinese website!