PHP Curl generated cookie file meaning cookie attribute meaning

Source: Internet
Author: User
Tags http cookie rfc

The recent use of curl feeling is still very convenient, looked at the cookie file format of curl generated, some of the value of the meaning is not very clear, to find some information about the cookie looked down, do a memo

The cookie file format generated by PHP Curl is as follows

#Netscape HTTP Cookie File#http://curl.haxx.se/rfc/cookie_spec.html#This file is generated by libcurl! Edit at your own risk.Jifen. xx.comFALSE/FALSE0PHPSESSID Dmdvk314rus811frmr6ud91uu7jifen. xx.comFALSE/FALSE1LNC deleted. xx.comTRUE/FALSE1459287448 UID 41054460.xx.comTRUE/FALSE1459287448 Name_ie%2555%2556%2553%2554%2552%2555%2554%2555%2549%2564%25113%25113%2546%2599%25111%25109.xx.comTRUE/FALSE1459287448 Site_str_flag 2.xx.comTRUE/FALSE0 Need_modify_name 0Jifen. xx.comFALSE/FALSE1459366648 Score 60

For this, I looked through the browser grab bag.

Response sent bytes of Cookie data:    set-cookie:uid=41054460; expires=wed, 30-mar-2016 15:55:46 GMT; path=/; domain =xx.com    Response sent bytes of cookies data: set-cookie:need_modify_name=0; path=/; domain=xx.com    
Compare the files generated by curl and look at one of the following, for example:

. xx.com    TRUE    /    FALSE    1459287448    uid    41054460

set-cookie:uid=41054460; expires=wed, 30-mar-2016 15:55:46 GMT; path=/; Domain=xx.com

. xx.cookie Domain Name

TRUE meaning not known

/scope

Fasle meaning don't know

1459287448 cookie expiry time stamp, 0 if the browser is closed to expire

UID Cookie Key

41054460 Cookie Value

I'm looking for some information.

Curl generated file comments in the URL open looked under, there is an explanation, inside the HTTP request header (HTTP requests header) and HTTP response header (HTTP Response header) in the format of the example, you can see

Http://curl.haxx.se/rfc/cookie_spec.html
Set-cookie:name=value; expires=DATE;p Ath=path; Domain=domain_name; Secure

Set the lifetime expires of the cookie to "0" or negative, so that when the browser is closed, the cookie is cleared as soon as this is not set Expiresset-cookie:need_modify_name=0; path=/; Domain=xx.com
And found the next Baidu encyclopedia. There are some explanations, basically consistent.

Http://baike.baidu.com/link?url= M6iw00ups9wok7xqlg2fufshqetfbsz6uruss63y7zcqkjw4xqzh6dsxt6f4uk4zdiq1vbqchdugcmzkg0adls4ip_qikpqspai20plda83

PHP Curl generated cookie file meaning cookie attribute meaning

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.