获取客户端IP地址 [英] Get clients IP Address

查看:111
本文介绍了获取客户端IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器上发布了我的网站。想要获取浏览我的网站的机器的IP地址,并将它们保存在表格中。如何获取IP地址?我已经用Google搜索了。有些东西但他们返回服务器机器的IP地址而不是用户/客户端机器

帮助我..

I have published my web site on server. want to get the IP Address of the machines from where my website is browsed and save them in table.How can i get the IP Addresses ?I have Googled for it.Tried some things but they return the IP address of server machine not the user/client machine
Help Me..

推荐答案

尝试:

Try:
Request.ServerVariables("REMOTE_ADDR")






or

Request.UserHostAddress






or

Request.ServerVariables("HTTP_X_FORWARDED_FOR")





- Amy


这篇关于获取客户端IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆