设为首页】 【加入收藏】 【网站地图】 【商品折扣
娱乐一生 娱乐明星
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
首页  |  java  |  .NET  |  C/C++  |  网页技术  |  php  |  asp  |  delphi  |  VC  |  VB开发  |  游戏开发  |  软件工程  |  Power Builder  |  Linux开发  |  Windows开发技巧
当前位置:首页 >> ASP实例 >> 使用XMLHTTP制作域名查询系统_ASP实例_src119.com

使用XMLHTTP制作域名查询系统_ASP实例_src119.com -

<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTT age(Path)
  t = GetBody(Path)
  getHTT age=BytesTo tr(t,"GB2312")
End function

Function GetBody(url)
  on error resume next
  Set Retrieval = CreateObject("Microsoft.XMLHTTP")
  With Retrieval
  .Open "Get", url, False, "", ""
  .Send
  GetBody = .Re o eBody
  End With
  Set Retrieval = Nothing
End Function

Function BytesTo tr(body,Cset)
  dim objstream
  set objstream = Server.CreateObject("adodb.stream")
  objstream.Type = 1
  objstream.Mode =3
  objstream.Open
  objstream.Write body
  objstream.Position = 0
  objstream.Type = 2
  objstream.Charset = Cset
  BytesTo tr = objstream.ReadText
  objstream.Close
  set objstream = nothing
End Function
%>
<%
if request("domain")< gt;"" then
'url="http://panda.www.net.cn/cgi-bin/Whois.cgi?domain="&am request("domain")&am "&am "&am request("root")&am "=ye am work=whoi am referer=http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&am request("domain")
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&am request("domain")&am "&am ext="&am request("root")
wstr=getHTT age(url)
'www.knowsky.com
're o e.write I tr (wstr,"可以注册") 
  if i tr(lcase(wstr),"已被注册的域名")>0 then
  body="域名已经被注册"
  elseif i tr(lcase(wstr),"未被注册的域名")>0 then
  body="域名未被注册"
  else
  body="网络延迟,请重新查找"
  end if 
end if
%>

<table width="40%" border="0" align="center" cellpadding="5" cell acing="1" bgcolor="#999999">
  <tr>
  <td height="26" bgcolor="efefef">域名查询系统:<% if request("domain")>"" then re o e.Write(request("domain")&am "."&am request("root")&am ody) end if%> lt;/td>
  </tr>
  <tr>
  <td bgcolor="#FFFFFF"> lt;form name="form1" method="post" action=""> lt;table width="100%" border="0" cell acing="1" cellpadding="1">
  <tr>
 
  <td height="36"> <div align="center">www.
  <i ut type="text" name="domain">
  < elect name="root" id="select">
  <option value="cn" selected>.c lt;/optio gt;
  <option value="com">.com</optio gt;
  <option value="net">.net</optio gt;
  <option value="org">.org</optio gt;
  <option value="com.cn">.com.c lt;/optio gt;
  <option value="net.cn">.net.c lt;/optio gt;
  <option value="gov.cn">.gov.c lt;/optio gt;
  </select>
  </div> lt;/td>
 
  </tr>
  <tr>
  <td height="35">
<div align="center">
  <i ut type="submit" name="Submit" value=" 查 询 ">
  </div>
  <div align="center"> lt;/div> lt;/td>
  </tr>
  </table> lt;/form> lt;/td>
  </tr>
</table>

<  align="center"> am lt;/ gt;
<table width="40%" border="0" align="center" cellpadding="5" cell acing="1" bgcolor="#999999">
  <tr>
  <td height="42" bgcolor="#FFFFFF">
<FORM name=search_form action='http://search.sohu.com/web'  method=get target=_blank>
  <div align="center">
  <i ut type="hidden" name="pid" value="hljec">
  <i ut name="query" type="text" style="font-size:14px;width:150" value="好域名">
  <i ut type="submit" name=" " value="查看"  onclick=document.search_form.action='http://search.sohu.com/web' style="font-size:14px;width=40;height=20">
  &am lt;/div>
  </FORM> lt;/td>
  </tr>
</table>

代码我已经在本地测试过了。正常通过。
文章里面的用到的Microsoft.XMLHTTP组件。其用法请参见:http://www.knowsky.com/5190.html



 

娱乐图摘

更多 >>

靓丽清纯美女meimei

美女私房全裸照
导演劝女演员脱衣服(视频)

大胆火辣人体艺术写真(图)

黑丝妹妹热辣诱惑-丝袜美女妹妹

PLMM 漂亮妹妹图集-妹妹图库

全球美女图库-美女集中营

52MM 我爱漂亮妹妹-制服妹妹诱惑

图王图库-世界美女明星图片资料库
美女写真集锦

激情两性-解密性生活
浴室MM湿身内衣诱惑
邻家小妹洗澡被偷拍(视频)

热点文章

更多

· XMLHTTP+Javascript+Asp写得聊天室,无刷
· 让您的主页支持各种浏览设备(ASP+篇)(下)_ASP实例_
· 将你的网站设置为客户的信任站点--WSH方案_ASP实例_s
· W3 Jmail中文使用说明_ASP实例_src119.co
· 利用XSL和ASP在线编辑XML文档_ASP实例_src11
· 一种在线人数统计方法(只用1个APPLICATION)_AS
· aspemail组件的应用_ASP实例_src119.com
· ASP连接执行程序 _ASP实例_src119.c
· 嵌入式Web视频点播系统实现方法_ASP实例_src119.
· 利用ASP实现三个强大功能之三_ASP实例_src119.c

热点文章

更多