用法:进入网站()申请key,然后填入自己想要转换的信息即可
using System;
using System.Text;
using System.Net;
namespace IP{ class Program { static void Main(string[] args) { string key = "****************"; string lnglatInfor = "*****************"; int type=1; string url = "http://api.haoservice.com/geoconv/v1?lnglatInfor="+lnglatInfor+"&type="+type+"&key="+key; WebClient wc = new WebClient(); wc.Encoding = Encoding.UTF8; string str = wc.DownloadString(url); Console.WriteLine(str); Console.ReadKey(); } }}