What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR
What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR?
it is impossible to say. Different proxies may implement these, or may not. The implementations may vary from one proxy to the next, and they may not. A lack of a standard breeds question marks.
Why would one have different values than the other?
See point 1. However, from a purely practical point of view, the only reason I can see for these having different values is if more than one proxy was involved - the X-Forwarded-For: header might then contain a complete track of the forwarding chain, whereas the Client-IP: header would contain the actual client IP. This is pure speculation, however.
Where can I find resources on the exact definition of these headers.
Where can I find resources on the exact definition of these headers. - You can't. See point 1.
There does seem to be some kind of de-facto standard regarding the X-Forwarded-For: header, but given that there is no RFC that defines it this cannot be relied upon see comment below.
As a side note, the Client-IP: header should by convention be X-Client-IP: since it is a 'user-defined' header.
What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR的更多相关文章
- REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR获取客户端IP
话不多说,先上代码: /** * 获得用户的真实IP地址 * * @access public * @return string */ function real_ip() { ...
- [转]REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR
午睡一觉醒来,突然想伪造IP地址.搜了一下,Mark. 源地址:http://www.cnblogs.com/lmule/archive/2010/10/15/1852020.html ------- ...
- PHP获得真实客户端的真实IP REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR
REMOTE_ADDR 是你的客户端跟你的服务器“握手”时候的IP.如果使用了“匿名代理”,REMOTE_ADDR将显示代理服务器的IP. HTTP_CLIENT_IP 是代理服务器发送的HTTP头. ...
- PHP获得真实客户端的真实时用到的IP REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR
REMOTE_ADDR 是你的客户端跟你的服务器“握手”时候的IP.如果使用了“匿名代理”,REMOTE_ADDR将显示代理服务器的IP. HTTP_CLIENT_IP 是代理服务器发送的HTTP头. ...
- 详解REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR
转载自:http://www.cnblogs.com/lmule/archive/2010/10/15/1852020.html 看ecshop的lib_base.php的时候里面获取客户端真实ip的 ...
- PHP获得真实客户端的真实IP REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR[]转载
REMOTE_ADDR 是你的客户端跟你的服务器“握手”时候的IP.如果使用了“匿名代理”,REMOTE_ADDR将显示代理服务器的IP. HTTP_CLIENT_IP 是代理服务器发送的HTTP头. ...
- HTTP_CLIENT_IP、HTTP_X_FORWARDED_FOR、REMOTE_ADDR
REMOTE_ADDR 是你的客户端跟你的服务器"握手"时候的IP.如果使用了"匿名代理",REMOTE_ADDR将显示代理服务器的IP. HTTP_CLIEN ...
- PHP中获取内网用户MAC地址(WINDOWS/linux)的实现代码
做一个内网根据MAC地址自动登录的应用,在WINDOW 2003可以正常使用,函数如下 复制代码 代码如下: function ce_getmac() { if(PHP_OS == 'WINNT' ...
- 腾讯新浪通过IP地址获取当前地理位置(省份)的接口
腾讯新浪通过IP地址获取当前地理位置(省份)的接口 腾讯的接口是 ,返回数组 http://fw.qq.com/ipaddress 返回值 var IPData = new Array(" ...
随机推荐
- HTML5 Shiv--解决IE(IE6/IE7/IE8)不兼容HTML5标签的方法
HTML5的语义化标签以及属性,可以让开发者非常方便地实现清晰的web页面布局.大多数浏览器基本兼容html5,但目前来说ie6/ie7/ie8还不兼容html5标签,所以需要javascript处理 ...
- Java生产环境下性能监控与调优详解
1:JVM字节码指令与 javapjavap <options> <classes>cd monitor_tuning/target/classes/org/alanhou/m ...
- vue keep-alive缓存问题
搬运自:https://blog.csdn.net/dongguan_123/article/details/80910231 我的问题:列表页 > 详情页a > 支付页 > ...
- SQLite 小调研
一. 概况: SQLite 是 D. Richard Hipp 于 2000 年采用 C 语言编写的一个轻量级.跨平台的关系型数据库,支持大部分 SQL92 标准(比如视图.事务.触发器.blob 数 ...
- Linux grep return code
The exit code is 1 because nothing was matched by grep. EXIT STATUS The exit status is 0 if selected ...
- zmq的send
int zmq_send (void *socket, zmq_msg_t *msg, int flags); 2.2.1 nt zmq_send (void *socket, void * ...
- 尝试让Virtualbox的Ubuntu可以调整分辨率
在Virtualbox安装的Ubuntu,默认不是全屏,操作起来不是很方便,网上查了资料,按照网上的教程来操作并记录下自己的操作记录. 在安装的Ubuntu的虚拟机,通过 "设备" ...
- 继承中的隐藏(hide)重写(Override)和多态(Polymorphism)
继承中的隐藏:(不要使用隐藏,语法没有错误但是开发项目时会被视为错误) 在继承类中完全保留基类中的函数名 //基类,交通工具 class Vehicle { public void Run() { C ...
- 字符串匹配dp+bitset,滚动数组优化——hdu5745(经典)
bitset的经典优化,即把可行性01数组的转移代价降低 bitset的适用情况,当内层状态只和外层状态的上一个状态相关,并且内层状态的相关距离是一个固定的数,可用bitset,换言之,能用滚动数组是 ...
- 线性dp——cf988F
不是很难,dp[i]表示到位置i的最小花费 #include<bits/stdc++.h> using namespace std; #define ll long long #defin ...