Пример #1
0
        /// <summary>
        /// 是否是中国IP
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        public static string GetAdrByChinaIp(string ip)
        {
            string appurl = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=" + ip;
            string html   = Utils.GetHttpData(appurl).Trim();

            html = html.Replace("-", "").Replace("1", "").Replace("2", "").Replace("-", "");
            if (html.Trim().Length == 0)
            {
                html = "火星";
            }
            return(html);
        }