Curl simulates logon and finds that the url on the cookie is always changing.

Source: Internet
Author: User
Curl simulates logon and finds that the url sent by the cookie is always changed. The first step is to open the homepage in get mode. The second step is to click the logon button on the homepage. the logon box is displayed, and the post data completes the logon. The second step requires a cookie value generated during the first step. The first step is to access the home page, but it will automatically follow the request for nearly 10 URLs. Many of these URLs are the js loaded on the home page. then the curl simulates logon and finds that the url issued by the cookie is always changing.
Step 1: open the home page in get mode. Step 2: Click the "log on" button on the home page. the "log on" dialog box is displayed, and the post data is used to log on.
The second step requires a cookie value generated during the first step.
The first step is to access the home page, but it will automatically follow the request for nearly 10 URLs. Many of these URLs are automatically issued by the js loaded on the home page.
This cookie is written to the client on a page of these pages.
But how many pages do I need to simulate this cookie?
These pages also change. some URLs will appear this time and will not appear the next time you create a homepage. In short, I don't know which page the cookie was issued during a certain visit.

Curl does not seem to be able to automatically process the new js request page under the first request page as the browser does?
It seems impossible to simulate pages one by one.

I was thinking that curl should be used to request a page that automatically sends subsequent requests, so that all cookies can be obtained. But the implementation does not seem like this. curl can have only one url request.
Isn't curl powerless like this? After all, curl is not a browser.
Prompt. If curl cannot be used, what can be done? Url browser
------ Solution --------------------
Clear all cookie caches, and then browse the page to capture packets to see what specific URLs are available. Repeat until the cookie generated url is captured.
Access the url that generates the cookie + access the target page.

This is a cumbersome process. curl is not a smart robot, but a transmission tool that supports multiple protocols.
------ Solution --------------------
Does curl execute js?
Those professional browsers still 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.