1, accept: Tell the Web server to accept what the media type, */* represents any type, type/* represents all sub-types under the type, Type/sub-type.
2. Accept-charset: The character set that the browser affirms itself to receiveAccept-encoding:
//get all HTTP request header information---function is only available for Apache or alias Apache_request_headers ()$is _headers=function_exists(' Getallheaders ');$headers=Array();if(!isset($is _headers) ) #如果是nginx {foreach($_server as
Each HTTP request and response is accompanied by header information, some of which are useful to the developer, and some pages are of no useBy default, the XHR request is sent along with the following header informationAccept: The content type that
By default, many Apache installations display version numbers and operating system versions, and even show what Apache modules are installed on the server. This information can be used by hackers, and hackers can also learn that many of the settings
HTTP (hypertexttransferprotocol) is an abbreviation for Hypertext Transfer Protocol, which is used to transmit data of WWW mode, please refer to RFC2616 for details of HTTP protocol. The HTTP protocol uses the request/response model. The client
(1) HTTP method: There are usually post, get these two(2) Request Url:http Resources(3) HTTP version: which HTTP protocol to use, common with http/1.1 and http/1.0(4) Host: Name of the requested hostname(5) User-agent: User agent category, generally
CnCxzSecs Blog
HTTP HeaderIt consists of four parts: Common headers, request headers, response headers, and object headers.Each header domain is composed of one domain name, colon (:) And the domain value. The domain name is case-insensitive. You
Curl is a powerful HTTP operation library that can be used to perform HTTP operations, reducing the complexity of using socket in code. it also contains a file transfer tool curl that uses the URL syntax to work under the command line. specific
Re: http://www.oschina.net/question/234345_42536? Sort = Time
If the server is a cluster, the etag parameters in the HTTP header returned by different servers are different. If the image is generated by a program, we can use the no-Cache headers to
// Send the 404 status code to the browserHeader ("HTTP/1.1 404 Not Found ");OrHeader ("HTTP/1.1 404 ″);
// Permanent redirectHeader ("Location: http://weizhifeng.net/"); // The default value is 301.// Temporary redirectionHeader ("HTTP/1.1 302
Gets the header information for the HTTP request.
The PHP manual provides a ready-made function:
Getallheaders
(PHP 4, PHP 5)
Getallheaders-fetch all HTTP Request headers
Description
Arraygetallheaders (void)
Fetches all HTTP headers from the
Explanation of header information in HTTP messages
This article follows: The HTTP message includes the client's request message to the server and the server's response message to the client. These two types of messages consist of a starting line,
Send a 404 status code to the browserHeader ("http/1.1 404 Not Found");OrHeader ("http/1.1 404″");
Permanent redirectionHeader ("location:http://weizhifeng.net/");//default is 301 JumpTemporary redirectionHeader ("http/1.1 302 Found");Header
Dancing with flowersHTTP headERSDetection
Variable
Value
If Request. ServerVariables (key) = "" Then
If GetAttribute (key) = "" Then
Response. Write ""
Else
Response. Write GetAttribute (key)
End If
Else
Response. Write Request.
HTTP header informationThe header information is composed of "key: value. They describe the properties of the client or server, the transferred resources, and the connection to the server.
Four different types of header labels
General header: it can
HTTP headERS detection
variable
value
If Request. ServerVariables (key) = "" Then
If GetAttribute (key) = "" Then
Response. Write ""
Else
Response. Write GetAttribute (key)
End If
Else
Response. Write Request. ServerVariables
HTTP header explanation
1. Accept: indicates the media type that the WEB Server accepts. */* indicates any type, and type/* indicates all child types of the type, type/sub-type. 2. Accept-Charset: the browser declares the character set it
For details about how to post data in json format, add an http header, and accept the returned data, see the following code:
View plaincopy to clipboardprint? Private void HttpPostData (){Try {HttpClient httpclient = new DefaultHttpClient ();String
IP address of the remote_addr– access clienthttp_via– If you have this message, it proves that you are using a proxy server, and the address of the proxy server is the value behind.http_x_forwarded_for– If this message is available, it also proves
the HTTP HeadERS detection of thousand flowers flying
variable
value
If Request.ServerVariables (key) = "" Then
If getattribute (key) = "" Then
Response.Write ""
Else
Response.Write GetAttribute (Key)
End If
Else
Response.Write
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.