2012-03-18 关键词: 4006
try
{
if (Request.QueryString["domains"] != null)
{
StringBuilder sb = new StringBuilder();
sb.Append("[");
foreach (string domain in Request.QueryString["domains"].Split(','))
{
WebRequest wr = WebRequest.Create("=" + domain);
//wr.Timeout = 10000;
string strHtml = new StreamReader(wr.GetResponse().GetResponseStream()).ReadToEnd();
XmlDocument xd = new XmlDocument();
xd.LoadXml(strHtml);
&nꦑbsp; XmlNode root = xd.SelecಌtSingleNode("property");
sb.Append(",{\"returncode\":\"" + root.ChildNodes[0].InnerText + "\",\"key\":\"" + root.ChildNodes[1].
InnerText + "\",\"original\":\"" + root.ChildNodes[2].InnerText + "\"}");
}
sb.Append("]");
string s = sb.ToString().Replace("[,","[");
Response.Write(s);
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
&n✤bsp; }
$.ajax({
type: "get",
dataType: "json",
url: 'checkdomain.aspx',
data: 'domains='+domains,//此处传递多个域名到checkdomain.aspx,以逗号分隔
cache: false,
success: function (returndata) {
$.each(returndata, function(i, n){
//n.original
//n.key
})
}
꧃  🌳; });
1、域名查询
接口采用HTTP,POST,GET协议:
调用URL:
参数名称:area_domain 值为标准域名,例:hichina.com
调用举例: