⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 whois.asp

📁 asp网站原代码绝对教材 asp网站原代码绝对教材
💻 ASP
字号:

<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
}
body,td,th {
	font-size: 12px;
	color: #FFFFFF;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(images/index_09.gif);
}
-->
</style>
</head>
<body>
<script language="javascript">
function CheckEmail(item)
{
 var etext=form1.domain.value;
 var elen=form1.domain.value.length;
 var i;
 var aa;
 //增加minghui.com sinous.com cbs.com cdn.com 提示,以后问题解决了还要去掉 
  var domainStr;
  var domainStrV;
  var keywz;
  if (elen>60)
 {
  alert("请不要输入超过60个字符!");
  return false;  
 }
 if(etext=="")
 {
     alert("请输入要查询的域名!");
  return false;
 }
 for (i=0;i<=elen-1;i++)
 {
  aa=etext.charAt(i)
  if ((aa==' '))
  {
   alert("域名不能有空格!");
   return false;
  }
  if ((aa=='.'))
  {
   alert("不能直接输入带后缀的域名,只要输入想注册域名的名称即可查询!");
   return false;
  }
 }
  
 return true;
}
</script>
<%OutMsg="请输入您需要查询的域名"%>
<br>
<table width="701" border="0" align="center" cellpadding="2" cellspacing="1" background="images/index_09.gif">
  
  <tr> 
    <td width="30%" height="32" background="images/index_09.gif"><div align="left">
        <table width="96%" border="0" align="center" cellpadding="2" cellspacing="1">
          <tr>
            <td background="images/index_09.gif" bgcolor="#999999"><%=OutMsg%> 
              <%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
        t = GetBody(Path)
        getHTTPPage=BytesToBstr(t,"GB2312")
End function
Function bstr(vIn)
 Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
 strReturn = ""
 
 For i = 1 To LenB(vIn)
  ThisCharCode = AscB(MidB(vIn,i,1))
  If ThisCharCode < &H80 Then
   strReturn = strReturn & Chr(ThisCharCode)
  Else
   NextCharCode = AscB(MidB(vIn,i+1,1))
   strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
   i = i + 1
  End If
 Next 
 bstr = strReturn  
End Function
Function GetURL(url)
    Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
 
          With Retrieval
          .Open "GET", url, false
    .setRequestHeader "Content-Type","application/x-www-form-urlencoded"
          .Send
          GetURL = .ResponseBody
          End With
    Set Retrieval = Nothing
 GetURL=bstr(GetURL)
End Function
%>
              <%
domain= Request.QueryString("domain")
dtype=request.QueryString("type")
if domain<>"" then
 if dtype<>"" then 
 TakenHTML = GetURL("http://panda.www.net.cn/cgi-bin/Whois.cgi?domain="&domain&"&"&dtype&"=yes&referer=http://www.net.cn/static/domain/")
 startpoint=instr(TakenHTML,"<!-- start -->")
 endpoint=instr(TakenHTML,"<!-- end -->")
 TakenHTML =mid(TakenHTML,startpoint,endpoint-startpoint)
 TakenHTML =replace(TakenHTML,"万网","<a href='http://www.35cen.cn'><font color=#ff000>商务世纪</font></a>")
 %>
 <%
'判断域名是否被注册
if InStr(TakenHTML,"No entries") > 1 then
    
Response.Write Domain & "出错了,请返回!<br><br>"
else
    if (InStr(TakenHTML,"no match record") or InStr(TakenHTML,"No match") or InStr(TakenHTML,"NOT FOUND") or InStr(TakenHTML,"Not found")  or InStr(TakenHTML,"no matching record"))> 1 then %>
		<font color="red" style="font-size:16px"><b>祝贺您  这个域名可以注册:<br>
		</b></font>您想注册的域名
		<b>[
		<% =Domain %>
		.<%=dtype%> ]还没有被注册</b><a href="reg.asp">开始注册</a><br>
	    <% else %>
        <font color="red" style="font-size:16px"><b>对不起:</b></font>您想注册的域名
	    <b>[
	    <% =Domain %>
	  .<%=dtype%> ]已经被注册了! <a href="yuming.asp">重新查询<br>
	  </a></b>请您换个域名再试;
	  <%end if%>
	  <%end if%>
      <!---判断域名是否被注册----->
      <%
 response.Write(TakenHTML) 
 else
 OutMsg="请选择域名类型!"
 end if
else
OutMsg="您输入的域名不能为空!"
end if
%>
      </td>
          </tr>
        </table>
    </div></td>
  </tr>
  <tr> 
    <td height="4" background="images/index_09.gif"><form name="form1" method="get" action="yuming.asp" onSubmit="return CheckEmail(this.domain);">
        <table width="96%" border=0 align="center" cellpadding="2" cellspacing="1" background="images/index_09.gif">
          <tr> 
            <td height="30" colspan="4" background="image/domian_bg.jpg"> <div align="center"> 
                <input name="domain" class=whois_box value="<%=rs(myform)%>" size="23" maxlength=63>
                <input name="Submit" type="submit" value="查询" align=absMiddle  width=38 border=0>
            </div></td>
          </tr>
          <tbody>
            <tr bgcolor="#FFFFFF"> 
              <td width="25%" background="images/index_09.gif"> <input name="type" type="radio" value="com" checked>
              .com</td>
              <td width="25%" background="images/index_09.gif" bgcolor="#FFFFFF"> <input type="radio" name="type" value="net">
              .net </td>
              <td width="25%" background="images/index_09.gif" bgcolor="#FFFFFF"> <input type="radio" name="type" value="org">
              .org </td>
              <td width="25%" background="images/index_09.gif" bgcolor="#FFFFFF"> <input type="radio" name="type" value="cn">
              .cn </td>
            </tr>
            <tr bgcolor="#f3f3f3"> 
              <td width="25%" height="19" background="images/index_09.gif" bgcolor="#f3f3f3"> <input type="radio" name="type" value="comcn">
              .com.cn</td>
              <td width="25%" background="images/index_09.gif" bgcolor="#f3f3f3"> <input type="radio" name="type" value="netcn">
              .net.cn</td>
              <td width="25%" height="19" background="images/index_09.gif"> <input type="radio" name="type" value="orgcn">
              .org.cn</td>
              <td width="25%" height="19" background="images/index_09.gif" bgcolor="#999999"> <input type="radio" name="type" value="govcn">
              .gov.cn</td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td width="25%" background="images/index_09.gif" bgcolor="#FFFFFF"> <input type="radio" name="type" value="info">
              .info </td>
              <td width="25%" background="images/index_09.gif"> <input type="radio" name="type" value="biz">
              .biz </td>
              <td width="25%" background="images/index_09.gif" bgcolor="#999999"> <input type="radio" name="type" value="tv">
              .tv </td>
              <td width="25%" background="images/index_09.gif" bgcolor="#999999"> <input type="radio" name="type" value="cc">
              .cc </td>
            </tr>
          </tbody>
        </table>
      </form> 
</table>
</body>
</html> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -