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(" ...
随机推荐
- 通过java api 读取sql 中数据(查询)
配置文件:dbconfig.properties 里面的数据 jdbc.url.jwhat=jdbc\:mysql\://ip\:3306/laibadev?useUnicode\=true& ...
- 数据整理B
- .Net中Task使用来提高代码执行效率
技术不断更新迭代,更高效的执行效率越来越被重视,所以对Task的使用进行了简单使用做了整理与大家分享. .Net 中有了Task后使多线程编程更简单使用和操作,下面粘上代码进行简单说明: /// &l ...
- tty - 显示连接标准输入的终端的文件名
总览 (SYNOPSIS) tty [OPTION]... 描述 (DESCRIPTION) 显示 连接 标准输入 的 终端 的 文件名. -s, --silent, --quiet 什么 都 不显示 ...
- Java—Map浅入
写支付签名的时候遇到了Map一家,就简单的比较了一下,于是乎先打印看看结果 Map<String,String> hashMap1 = new HashMap<>();hash ...
- 杭电多校第一场-M-Code
题目描述 After returning with honour from ICPC(International Cat Programming Contest) World Finals, Tom ...
- Failed selinux 错误
再看他如何解决,步骤大概是: 1.开机之后进入linux启动选择界面,停在平时启动的哪那一行按E键,进入grub编辑页面. 2.按↓键光标往下移,在标签fi下面的内容里加上一个enforcing=0. ...
- Aria2 Centos8 安装配置
使用chkconfig 或者 chkconfig –list就可以看出当前系统已经设置的各个服务在各个运行级别下的开闭状态.如果我们想设置某个服务自启动或者关闭的话,那么只需要按照下面的格式使用即可 ...
- php漂亮的分页类
<?php /* * PHP分页类 * @package Page * @Created 2013-03-27 * @Modify 2013-03-27 * ...
- 【转】硬盘分区知识介绍(MBR)
转自:http://www.blogjava.net/galaxyp/archive/2010/04/25/319344.html 硬盘是现在计算机上最常用的存储器之一.我们都知道,计算机之所以神奇, ...