使用c#中的ip地址获取完整地址的公司名称 [英] Get Company Name with full address using ip address in c#

查看:97
本文介绍了使用c#中的ip地址获取完整地址的公司名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,



我尝试使用IpAddress获取位置详细信息,并使用以下API成功获取城市和国家/地区详细信息



http://www.geoplugin.net/json.gp?ip=@yourIPAddress //返回Json



http://api.hostip .info /?ip = @ yourIPAddress //返回XML



现在我想得到公司/注册名称以及该IpAddress的完整地址。



这可能使用c#吗?如果是这样的方法是什么?

Friends,

I have tried getting location detail using IpAddress and successfully got City and country details using below api's

http://www.geoplugin.net/json.gp?ip=@yourIPAddress //Returns Json

http://api.hostip.info/?ip=@yourIPAddress //Returns XML

Now I wanted to get the company / Registered name along with full address for that IpAddress.

Is this possible using c#? if so what is the approach?

推荐答案

你不能。



有可能得到一些拥有IP域的公司所拥有的信息(可能与拥有该网站的公司有关,也可能没有关系): http://dotnet-snippets.com/snippet/whois-lookup/668 [ ^ ]

但是......许多网络托管公司将托管大量不同的公司域名,除非他们为静态IP地址支付额外费用它们不能绑定到特定的IP:IP地址的所有者是托管公司,而不是托管该IP网站的公司。即使它是静态IP,物理位置的详细信息也会指托管公司的位置:它可以很容易地在与拥有网站的公司不同的大陆上(例如,我在内华达州,我就是在威尔士)
You can't.

It's possible to get some information (which may or may not be related to the company owning the website) about the company that owns the domain that hosts the IP: http://dotnet-snippets.com/snippet/whois-lookup/668[^]
But...many web hosting companies will host loads of different company domains, and unless they have paid extra for a static IP address they can't be tied to a specific IP: the "owner" of the IP address is the hosting company, and not the company hosting the website on that IP. Even if it is a static IP, the physical location details will refer to the hosting company location: which can easily be on a different continent to the company "owning" the website (mine is, for example, in Nevada, and I'm in Wales)


它不太可能通过IP地址获取街道地址,但您可以找到附近的城市。
It is not likely to get the street address via IP Address but you may locate the nearby city.


这篇关于使用c#中的ip地址获取完整地址的公司名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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