我在asp程序里用:
'取得客户端ip地址
ip = ""
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then
ip = Request.ServerVariables("REMOTE_ADDR")
end if
得到客户端的真实ip地址,然后用input框显示,可是为什么每回返回的好像都是服务器端的地址?
...全文
1958打赏收藏
用asp得到客户端ip地址为什么总是服务器的
我在asp程序里用: '取得客户端ip地址 ip = "" ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") end if 得到客户端的真实ip地址,然后用input框显示,可是为什么每回返回的好像都是服务器端的地址?