[PHP] HTTP protocol Header parsing

Source: Internet
Author: User

(Request-line)    Get/static/imgs/bqpd.jpg http/1.1accept    image/png, Image/svg+xml, image/*;q=0.8, */*;q=0.5accept-encoding    gzip, deflateaccept-language    zh-cnconnection    keep-alivecookie    wdcid=45fba9ac9ebe6e6c; vjuids= 8535c4bb.14a429661c9.0.516863e8d9fbd8; vjlast=1418456359.1418456359.30; wdlast=1418456359dnt    1Host    mil.msn.xinhuanet.comReferer    http://mil.msn.xinhuanet.com/User-Agent    mozilla/5.0 (Windows NT 6.3; Win64; x64; trident/7.0; rv:11.0) like gecko/20100101 firefox/12.0x-httpwatch-rid    92525-10060

The above is a grab-down HTTP header,

1, the first line get indicates that the browser uses the request method is get, the requested resource is a bqpd.jpg picture, using the http1.1 version protocol

2. Accept the data type acceptable to the browser

3, the browser accepts the data compression format

4. Language accepted by the browser

5. Connection information: Keep-alive indicates a long connection Agreement

6. Host indicates the destination of the request

7, Referer instructions from that page to jump over

8, user-agent Description of the current client browser version and the basic information of the system

[PHP] HTTP protocol Header parsing

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.