- using System.Text;
- using System;
- using System.Net;
- namespace 授权定位
- {
- class Program
- {
- static void Main(string[] args)
- {
- string key = "************************";
- string phone = "133**********";
- string url = "http://mobilelocation.haoservice.com/getlocation?phone="+phone+"&key=" + key;
- webClient wc = new WebClient();
- wc.Encoding = Encoding.UTF8;
- string str = wc.DownloadString(url);
- Console.WriteLine(str);
- Console.ReadKey();
- }
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/2906201614747.html
来源: http://www.codesnippet.cn/detail/2906201614747.html