PHPcurl simulates login to obtain cookie for help

Source: Internet
Author: User
PHPcurl simulated login to obtain cookie help Cainiao learn to use PHP curl to simulate login, wait for the weiphon Forum to use the following code successfully, login to www.xiaomi.com will survive and survive, help AH. The cookie is obtained. Please help me solve the problem. Think about what you can't do at night without income!
 


Reply to discussion (solution)

Delete row 19th

   
Test successful

However, the simulated account login effect is not achieved. Only the home page of xiaomi is collected.

It indicates that there is still data not submitted. For example:
Curl_setopt ($ ch, CURLOPT_REFERER,
Incomplete post data:
Input flag for automatic logon within two weeks: auto = 1
Other values of the form in the webpage.

$ Login_url = 'https: // account.xiaomi.com/pass/serviceloginauth ';
Should be:
$ Login_url = 'https: // account.xiaomi.com/pass/serviceloginauth2 ';

  
All
PassToken may be generated using js.

Thank you for your ideas. I will try again ~

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.