Questions about the effective time of the cookie captured by curl

Source: Internet
Author: User
The question about the effective cookietime captured by curluses the curlsimulation Forum to capture cookieand save it to cookie.txt. In the following simulated posting process, you can directly Post cookie.txt after reading it, saving time and saving the login process. In practice, forums of different types can do this. Now I have two questions about the cookie validity period captured by curl.
Use curl to log on to the forum, capture the cookie, and save it in cookie.txt.
In the following simulated posting process, you can directly Post cookie.txt after reading it, saving time and saving the login process.
In practice, forums of different types can do this.

Now I have two questions:

1. How long does it take to use curl to simulate the validity period of the cookie captured and saved after login?

2. is the effective time for capturing this cookie set by the original forum (which cannot be changed by yourself), or can the cookie effective time be changed by setting the curl parameter?

Please kindly advise! Thank you!

------ Solution --------------------
CURLOPT_COOKIEJAR save cookie
CURLOPT_COOKIEFILE read cookie
I only know this, but I do not know how to set the cookie's validity period.

Personally, since it is simulated login, the cookie must be related to setting the cookie validity period in the forum.

We look forward to high-end answers.

------ Solution --------------------
This cookie is defined by someone else!
During normal login, it is written in the client cookie
It's just that you wrote the cookie in the file during simulated login!
Related Article

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.