使用C#获取给定主机名的网站的地址/国家 [英] Get address/country of a website given it's hostname using C#

查看:93
本文介绍了使用C#获取给定主机名的网站的地址/国家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找出给出其网址的任何网站的位置(地址或国家/地区).是否有任何免费的网站,API或代码可用于查找此数据?

我希望该解决方案提供一种无限次查找的方法.

我正在使用C#.

在此先感谢

I need to find out the location (address or country) of any website given its url. Is there any FREE website, API, or code that can be used to find out this data?

I want the solution to provide a way with UNLIMITED number of look ups.

I''m using C#.

Thanks in advance

推荐答案

本教程将通过IP地址为您提供国家/地区名称:

在C#中优化IP到ISO3166国家/地区代码映射 [
This tutorial will get you a country name from an ip address:

Optimized IP to ISO3166 Country Code Mapping in C#[^]


这篇关于使用C#获取给定主机名的网站的地址/国家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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