Transferred from: http://blog.csdn.net/gueter/archive/2007/03/08/1524447.aspxAuthor:jeffreyIntroductionHTTP is an object-oriented protocol belonging to the application layer, which is suitable for distributed hypermedia information System because of
Network of Android series (ii) ---- HTTP request header and Response HeaderI. Introduction of HTTP headers: Correctly Setting HTTP headers helps search engines determine webpages and increase website access speeds. Generally, HTTP messages include
The most comprehensive HTTP header information analysis and HTTP header information analysis
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
Analysis and Implementation Code for PHP to obtain the real IP address of the client, and analysis of 5 Cases
$ _ SERVER ["REMOTE_ADDR"] is often used to obtain the Client IP address in PHP.(1) If the client is accessed by a proxy server, the IP
20120917 @ Zheng yu Summary
The common Java/PHP server obtains the Client IP address as follows:
PseudoCode:
1) IP = request. getheader ("X-FORWARDED-FOR")
Forge. See Appendix.
2) If the value is null or the array length is 0 or
In the JSP, the method to obtain the IP address of the client is: Request.getremoteaddr (), which is valid in most cases. However, the real IP address of the client cannot be obtained through the reverse proxy software such as Apache,squid.If the
Analysis of several PHP client IP addresses: no proxy server is used, transparent proxy server is used, normal anonymous proxy server is used, fraudulent proxy server is used, and high anonymous proxy server is used. In this article, we will
The external java/php server-side acquisition client IP is the same: pseudo-code:1) IP = Request.getheader ("x-forwarded-for") can be forged, refer to Appendix A 2) If the value is empty or the array length is 0 or equal to "unknown", then:IP =
The first and the method work together to determine what the client and server can do.Headers can be used to provide information in request and response messages, some headers are specific to a particular message, and some headers are more general.
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.