Curl simulated login question this post was last edited by zkg510168343 at 2013-10-22:29:21 & lt ;? Php $ url & nbsp; = & nbsp; "http://bbs.lampbrother.net/login.php"; $ ur curl simulated login problem
This post was last edited by zkg510168343 at 15:29:21, January 22 ,. $ Url = "http://bbs.lampbrother.net/login.php ";
$ Urls = "http://bbs.lampbrother.net ";
$ Lgt = 0;
$ User = "zkg12345 ";
$ Pass = "123456 ";
$ Question = 0;
$ Hideid = 1;
// Echo $ data; // you can see that the login is successful and the jump is being made.
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, 'http: // bbs.lampbrother.net/index.php ');
Curl_setopt ($ ch, CURLOPT_HEADER, 0 );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 0 );
Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ temp );
Curl_exec ($ ch );
Curl_close ($ ch );
?>
After the login is complete, I found that the login was successful when printing, and the page is displayed as a jump, but again requested the home page is still not logged on, other pages are not logged on, what is the problem and how to debug it?
A coo810B. tmp file is generated in the temporary cookie file.
The value is
# Netscape HTTP Cookie File
# Http://curlm.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service