扫码关注官方订阅号
php如何用curl模拟登录http://www.lazpw.cn/user/login.php这个。
首先使用chrome的调试功能,分析登陆表单提交的内容;使用curl的post提交表单 CURLOPT_POST CURLOPT_POSTFIELDS;并保存cookie CURLOPT_COOKIEJAR CURLOPT_COOKIEFILE;
CURLOPT_POST
CURLOPT_POSTFIELDS
CURLOPT_COOKIEJAR
CURLOPT_COOKIEFILE
`
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
首先使用chrome的调试功能,分析登陆表单提交的内容;
使用curl的post提交表单
CURLOPT_POSTCURLOPT_POSTFIELDS;并保存cookie
CURLOPT_COOKIEJARCURLOPT_COOKIEFILE;