Header information: User-Agent

Source: Internet
Author: User
Header information: User-Agent 'header' => 'Content-type: application/x-www-form-urlencoded '. "". 'user-Agent: post test '. "". 'content-length :'. strlen ($ post_string) + 8,

Please explain the meaning of the above sentence
I know that the encrypted content length is no less than 8 bytes when the form is submitted.


Reply to discussion (solution)

1. application/x-www-form-urlencoded is a way to express the submission, which uses urlencode, that is, the submitted data is encrypted, the server needs decode to obtain data correctly.
2. User-Agent: A User Agent is a browser. its information includes hardware platform, system software, application software, and users' personal preferences.
3. content-length: content length. strlen ($ post_string) + 8 indicates the length of the post String + 8, that is, the minimum value is 8.

Content-type encoding method here is where the data submitted by application/x-www-form-urlencoded is encoded as name/value pair
Content-length refers to the size of post data.
For post requests, you must specify Content-type and Content-length.

The User-Agent is the User proxy. for example, my chrome User proxy "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) chrome/38.0.2125.104 Safari/537.36 "you entered here



Strlen ($ post_string) does not know what to do with the + 8

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.