如何在C#中通过IP地址查找国家名称

问题描述:

我想通过IP地址找出国家名称请给我代码和帮助

I want to find out Country Name through IP Address Please give me code and help

请看这里:使用基于IP的地理定位 - 以及为什么它几乎没用。 [ ^ ] - 但是......请注意它不一定正确!
See here: Using IP based Geolocation - and why it's pretty much useless.[^] - but ... be aware it's not necessarily correct!


没有代码,因为IP地址与地理位置无关。如果您想从IP地址估算国家/地区,则需要使用地理定位服务。谷歌为他们找到你喜欢的,并遵循他们的实施说明。请注意,较好的可能不是免费的。
There is no "code" for this as IP addresses have no relation to geographic locations. If you want to approximate a country from an IP address you'll need to use a geolocation service. Google for them and find one you like and follow their implementation instructions. Note that the better ones might not be free.