jQuery模拟客户端访问IP
var ClinkIP = "111.13.101.208";
var url="http://www.baidu.com";
$.ajax({
url:url,
type:'GET',
contentType:'application/x-www-form-urlencoded',
beforeSend:function(XMLHttpRequest){
XMLHttpRequest.setRequestHeader("Client-IP", ClinkIP);
XMLHttpRequest.setRequestHeader("X-Forwarded-For", ClinkIP);
},
success: function(data) {
console.log('OK!');
}
});