手机归属地查询演示代码

时间:2014-09-11 15:32:13   收藏:0   阅读:334


手机归属地演示代码示例

申请key值(http://www.haoservice.com/docs/14 )后输入要查手机号就可以用了,刚测试完,没问题.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Net.Security;

using System.Security.Cryptography.X509Certificates;

using System.Net;

using System.IO;

using System.IO.Compression;

using System.Text.RegularExpressions;

using System.Web.Script.Serialization;

namespace IP

{

    class Program

    {

        static void Main(string[] args)

        {

            string key = "***********************************";

            string phone = "137.......";

            string url = "http://apis.haoservice.com/mobile?phone=" + phone + "&key=" + key;

            WebClient wc = new WebClient();

            wc.Encoding = Encoding.UTF8;

            string str = wc.DownloadString(url);

            Console.WriteLine(str);

            Console.ReadKey();


        }

    }

}


原文:http://fangcao.blog.51cto.com/9368421/1551077

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!