domain=trim(Request ("domain"))
'set ComX=server.CreateObject("freehost_com_7i24.FreehostM")
'domain=ComX.idntoac_7i24_com(Cstr(domain))domainarry=split(domain,".")
tar="http://panda.www.net.cn/cgi-bin/Whois.cgi?domain="&server.URLEncode(domainarry(0))&"&referer=http://www.net.cn/static/domain/&"
domtemp=replace(domain,domainarry(0),"")domtemp=replace(domtemp,".中国",".cn")
domtemp=replace(domtemp,".网络",".net.cn")
domtemp=replace(domtemp,".公司",".com.cn")'response.write domtemp
'response.end
xend=replace(domtemp,".","")&"=yes"
tar=tar&xendretdns=P_GETx(tar,"http://www.net.cn/static/domain/")
Function P_GETx(tar,ref)
Dim returnstr
Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
xml.setTimeouts FreeHost_t1, FreeHost_t2, FreeHost_t3, FreeHost_t4
xml.Open "GET", tar, False
xml.setRequestHeader "User-Agent","Mozilla/2.0 (compatible; MSIE 5.0B; Windows NT)"
xml.setRequestHeader "REFERER",ref
xml.send
returnstr = bytes2BSTR(xml.responsebody)
P_GETx = returnstr
End Function
'set ComX=server.CreateObject("freehost_com_7i24.FreehostM")
'domain=ComX.idntoac_7i24_com(Cstr(domain))domainarry=split(domain,".")
tar="http://panda.www.net.cn/cgi-bin/Whois.cgi?domain="&server.URLEncode(domainarry(0))&"&referer=http://www.net.cn/static/domain/&"
domtemp=replace(domain,domainarry(0),"")domtemp=replace(domtemp,".中国",".cn")
domtemp=replace(domtemp,".网络",".net.cn")
domtemp=replace(domtemp,".公司",".com.cn")'response.write domtemp
'response.end
xend=replace(domtemp,".","")&"=yes"
tar=tar&xendretdns=P_GETx(tar,"http://www.net.cn/static/domain/")
Function P_GETx(tar,ref)
Dim returnstr
Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
xml.setTimeouts FreeHost_t1, FreeHost_t2, FreeHost_t3, FreeHost_t4
xml.Open "GET", tar, False
xml.setRequestHeader "User-Agent","Mozilla/2.0 (compatible; MSIE 5.0B; Windows NT)"
xml.setRequestHeader "REFERER",ref
xml.send
returnstr = bytes2BSTR(xml.responsebody)
P_GETx = returnstr
End Function
解决方案 »
- 求开源在线纯web word/excel编辑器,付费的也可以
- 谁有或用过Aspose.Words for .NET操作word的详细实例
- |zyciis| 服务器控件已经有像Repeater的格式了,那如何进行数据绑定呢?,谢谢
- javascript問題
- 页面的扩展收缩功能是如何实现的?
- .NET中点击BUTTON时,界面布局会改变,怎么办啊?
- 各位高手,该出场了~~~~~~~~~~~~~~
- GRIDVIEW三层表头的点击排序问题!!!
- MVC3 ViewBag 问题
- Page.RegisterStartupScript 问题?
- asp.net连接Oracle数据库报错,请各位专家帮助
- struts2两个入门问题
string tar = "http://panda.www.net.cn/cgi-bin/Whois.cgi?domain=" + Server.UrlEncode(domainarry[0]) + "&referer=http://www.net.cn/static/domain/&"
string domtemp = domain.Replace(domainarry[0],"");
domtemp = domtemp.Replace(".中国",".cn");
domtemp=domtemp.Replace(".网络",".net.cn");
domtemp=domtemp.Replace(".公司",".com.cn"); string xend = domtemp.Replace(".","")&"=yes";
tar=tar&xend; string retdns=P_GETx(tar,"http://www.net.cn/static/domain/");
public string P_GETx(string tar , string url)
{
string returnstr;
try
{
WebRequest request = WebRequest.Create(url);
request.Timeout=20000;
WebResponse response = request.GetResponse();
Stream resStream = response.GetResponseStream();
StreamReader sr = new StreamReader(resStream, System.Text.Encoding.Default);
returnstr=sr.ReadToEnd();
resStream.Close();
response.Close();
request.Abort();
sr.Close();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ConnectFailure)
{
//无法连接到远程服务器, --换代理 IP
//MessageBox.Show(ex.ToString());
//初始化代理 IP
returnstr="无法连接到远程服务器";
}
else if (ex.Status == WebExceptionStatus.Timeout)
{
//超时 --换代理 IP
//MessageBox.Show(ex.ToString());
returnstr="超时";
}
else if (ex.Status == WebExceptionStatus.ProtocolError)
{
//文件未找到--跳出
//MessageBox.Show(ex.ToString());
returnstr="文件未找到";
}
}
}这样是否可行?
高手指点一下.