public static string[] GetID(string number) { try { string strSource = QQClient.Get("http://qq.ip138.com/idsearch/index.asp?action=idcard&userid=" + number.Trim() + "&B1=%B2%E9+%D1%AF", null, 100000, System.Text.Encoding.Default); //归属地 strSource = strSource.Substring(strSource.IndexOf("查询结果")); strSource = strSource.StripHTML(); strSource = strSource.Replace("\r", ""); strSource = strSource.Replace("\n", ""); strSource = strSource.Replace("\t", ""); strSource = strSource.Replace(" ", ""); strSource = strSource.Replace("查询结果 * ++", ""); strSource = strSource.Replace("-->", ""); string[] strnumber = strSource.Split(new string[] { "性别:", "出生日期:", "发证地:", "点击这里查询验证身份", "提示:" }, StringSplitOptions.RemoveEmptyEntries); string[] strnumber1 = null; if (strnumber.Length > 3) { strnumber1 = new string[] { strnumber[1].Trim(), strnumber[2].Trim(), strnumber[3].Trim() }; } return(strnumber1); } catch (Exception) { return(null); } }
public static string[] GetPhone(string number) { try { string strSource = QQClient.Get("http://www.ip138.com:8080/search.asp?mobile=" + number + "&action=mobile", null, 100000, System.Text.Encoding.Default); //归属地 strSource = strSource.Substring(strSource.IndexOf(number)); strSource = strSource.StripHTML(); strSource = strSource.Replace("\r", ""); strSource = strSource.Replace("\n", ""); strSource = strSource.Replace("\t", ""); strSource = strSource.Replace(" ", ""); strSource = strSource.Replace("-->", ""); string[] strnumber = strSource.Split(new string[] { "归属地", "卡类型", "邮 编", "区 号", "更详细", "卡号" }, StringSplitOptions.RemoveEmptyEntries); string[] strnumber1 = null; if (strnumber.Length > 4) { strnumber1 = new string[] { strnumber[1].Trim(), strnumber[2].Trim(), strnumber[3].Trim(), strnumber[4].Trim() }; } return(strnumber1); } catch (Exception) { return(null); } }