如何使用外部IP地址查找位置 [英] how to find location using external ip address

查看:93
本文介绍了如何使用外部IP地址查找位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以获取访问我网站的客户的外部IP地址。现在,如何使用该IP地址知道该位置的

名称。我想将该名称插入我的sql表中。我们应该获得内部IP地址来实现这一目标吗?我能够在页面加载时获取外部IP地址的代码是:

 ip = Server.HtmlEncode(Request.UserHostAddress); 



谢谢。

解决方案

任何努力?有很多文章,关于这个主题的例子。看看这个:



http:// www .dotnetcurry.com / ShowArticle.aspx?ID = 325 [ ^ ]

I am able to get the external ip address of clients who visit my website. Now, how to know the
name of the location using that ip address. I would like to insert that name into my sql table. Should we get the internal ip address to acheive this? My code wherein I am able to get the external ip address on page load is:

ip = Server.HtmlEncode(Request.UserHostAddress);


thanks.

解决方案

Any effort? There are tons of article, example on this topic. Look at this one:

http://www.dotnetcurry.com/ShowArticle.aspx?ID=325[^]


这篇关于如何使用外部IP地址查找位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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