string name1 = HttpContext.Current.Server.UrlEncode(TextBox1.Text);
WebClient wc = new WebClient();
string xmlstr = wc.DownloadString("http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=" + name1);
xml.InnerHtml = xmlstr;
if (xmlstr.IndexOf("200") > -1)
{
if (xmlstr.IndexOf("210") > -1)
{
xml.InnerHtml += "可以注册";
}
else if (xmlstr.IndexOf("211") > -1)
{
xml.InnerHtml += "已经被注册";
}
else if (xmlstr.IndexOf("212") > -1)
{
xml.InnerHtml += "参数错误";
}
else
{
xml.InnerHtml += "其他错误";
}
}
else
{
xml.InnerHtml += "返回出错!";
}
分享万网域名查询代码
最新推荐文章于 2018-10-21 21:21:00 发布