获取网络ISP名称 [英] To get network isp name

查看:413
本文介绍了获取网络ISP名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,
正在开发网站,因此正在做用户注册模块
现在,我要跟踪所有已注册的用户的服务提供商名称.
为此,我想使用c#
获取isp名称 进行编码 请给我发来帮助.

谢谢

Nandakumar S
s/w developer

dear sir,
am developing website, thus am doing user registration module
now i want track the user''s service provider name who are all registered.
for that i want coding for get isp name using c#
please send me that will help.

thanks

Nandakumar S
s/w developer

推荐答案

您可以使用服务器变量获取IP地址
You can get the IP address using Server variables
string ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];


或这个


or this

string strHostName = System.Net.Dns.GetHostName();
string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();


有关从IP获取国家名称的信息,请阅读
如何将IP地址转换为国家名称 [ GeoIP-您的互联网访问者来自哪里? [


For getting country name from IP read this article
How to convert IP address to country name[^]
GeoIP - Where are your internet visitors coming from?[^]


这篇关于获取网络ISP名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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