Curl emulation login found that the URL on the cookie always changes

Source: Internet
Author: User
Curl emulation login found the URL of the cookie is always changed
The first step, get the way to open the first page, the second step, click the Login button on the home page, will come out login box, post data to complete the login.
The second step requires a cookie value that is generated at the first step.
The first step is to access the home page, but will automatically follow the request for nearly 10 URLs. Many of these URLs are the first page loaded JS is sent automatically.
And this cookie is the one page in these pages written to the client.
It's hard to get this cookie to simulate 10 pages?
And found that these pages also have changes, and some URLs will appear in this time, the next time you hit a home page does not appear. In short, it is not known which page the cookie was sent to at the time of the visit.

Does curl seem to be unable to automatically process the new page of the JS request under the first request page like a browser?
If you want to do a page to simulate, it seems unlikely.

I was thinking, using curl to request a page, this page automatically issued a subsequent request, curl should be automatic processing is, so that all cookies can be obtained. But the implementation doesn't seem to be so, curl can only request one URL for a URL.
Is it, like this situation, that curl is powerless? After all, curl is not a browser.
You are prompted to prompt. If curl can't handle it, what words can be achieved? URL Browser


------Solution--------------------
Clear all cookie caches and then browse through this page to grab a packet and see what the URL is. Repeat until you capture the URL that generated the cookie.
Access the destination page of the url+ that generated the cookie.

This is a cumbersome process, curl is not an intelligent robot, he is only a multi-protocol to support the transmission tool.
------Solution--------------------
Does Curl Execute JS?
Those professional browsers have compatibility issues.

  • 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.