<%=page_title%>域名查询

<% on error resume next domain1=request("domain") ext1=request("ext") Dim Retrieval,Domain,TakenHTML,pagebefore,pageafter,zyj Private Function bytes2BSTR(vIn) Dim i, ThischrCode, NextchrCode strReturn = "" For i = 1 To LenB(vIn) ThischrCode = AscB(MidB(vIn, i, 1)) If ThischrCode < &H80 Then strReturn = strReturn & Chr(ThischrCode) Else NextchrCode = AscB(MidB(vIn, i + 1, 1)) strReturn = strReturn & Chr(CLng(ThischrCode) * &H100 + CInt(NextchrCode)) i = i + 1 End If Next bytes2BSTR = strReturn End Function Function GetURL(url) Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "GET", url, False, "", "" .Send GetURL = .ResponseText End With Set Retrieval = Nothing End Function if request("ext")<>"" then Domain = Replace(Request("domain"),"www.","") & "." & Request("ext") else Domain = domain1 end if if Domain=".com" or Request("domain")="" then Response.Write ("
") response.end end if if request("ext")<>"" then select case Request("ext") case "biz" TakenHTML = GetURL("http://www.china-channel.com/checkdomain.asp?action=whois&domain=" & Domain&"") pageafter = "

    "
    		pagebefore = "

" case "info" TakenHTML = GetURL("http://www.onlinenic.com/cgi-bin/english/info_whois.cgi?domain=" &Domain) pageafter = "

    "
    		pagebefore = "

" case "tv" TakenHTML = GetURL("http://www.onlinenic.com/cgi-bin/english/tv_whois.cgi?domain=" &Domain) pageafter = "

    "
    		pagebefore = "

" case "cc" TakenHTML = GetURL("http://whois.nic.cc/cgi-bin/globalwhois.pl?DOMAIN=" &Domain) pageafter = "" pagebefore = "" case "网络" TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain) pageafter = "

" pagebefore = "

" case "中国" TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain) pageafter = "

" pagebefore = "

" case "公司" TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain) pageafter = "

" pagebefore = "

" case else if InStr(Request("ext"),"cn")<>0 then TakenHTML = GetURL("http://ewhois.cnnic.net.cn/whois?entity=domain&value="&Domain) pageafter = "

" pagebefore = "

" else TakenHTML = GetURL("http://www-whois.internic.net/cgi/whois?type=domain&whois_nic=" & Domain ) pageafter = "

    "
    			pagebefore = "

" end if end select else TakenHTML = GetURL("http://seal.cnnic.net.cn/queryserver?nameInfo=" & Domain & "&entityName=keyword") pageafter = "

" pagebefore = "

" end if '#################################查询域名的详细注册情况的代码开始#################################### Function dowith() Dim tempcontent Dim pagestart Dim pageend tempcontent = TakenHTML pagestart = InStr(1,tempcontent, pageafter,1) If pagestart = 0 Then dowith = "对不起，暂时无法得到此域名的详细注册信息." Exit Function Else pagestart = pagestart + Len(pageafter) + 1 pageend = InStr(pagestart, tempcontent, pagebefore,1) If pageend = 0 Then dowith = "对不起，暂时无法得到此域名的详细注册信息!" d_exsit = 3 Exit Function Else pageend = pageend - pagestart '得到内容长度 tempcontent = Mid(tempcontent, pagestart, pageend) End If End If dowith = tempcontent if Request("ext") <> "cc" then dowith = "

    " + dowith + "

" if InStr(Request("ext"),"网络") <> 0 then dowith = "

" + dowith + "

" if InStr(Request("ext"),"中国") <> 0 then dowith = "

" + dowith + "

" if InStr(Request("ext"),"公司") <> 0 then dowith = "

" + dowith + "

" if InStr(Request("ext"),"cn") <> 0 then dowith = "
" + dowith + "
" if request("ext") = "" then dowith = "

" + dowith + "

" End Function '#################################查询域名的详细注册情况的代码结束#################################### %>

<%if InStr(TakenHTML,"No entries") > 1 then%>

对不起，您查询的域名 <%=Domain%> 出现错误! 请您核实后重新查询，谢谢！

<%end if%> <%if InStr(TakenHTML,"No match") > 1 or InStr(TakenHTML,"Register system prompt")>1 or InStr(TakenHTML,"not been registered yet")>1 or InStr(TakenHTML,"没有找到这个条目")>1 or InStr(TakenHTML,"此域名没有被注册")>1 or InStr(TakenHTML,"没有查到符合条件的记录")>1 or InStr(TakenHTML,"信息不存在")>1 or InStr(TakenHTML,"Not Exist")>1 or InStr(TakenHTML,"NOT FOUND")>1 or InStr(TakenHTML,"你所查询的信息不存在")>1 or InStr(TakenHTML,"注册服务机构列表")>1 then %>

恭喜，您所查询的域名 <% = Domain%> 还没有被注册 &ext=<%=request("ext")%>"> 提交注册申 >>

<%else%>

对不起，您所查询的域名 <% = Domain%> 已被注册，请您重新查询

<%end if%>

英文域名查询：WWW.
.com .net .org .cc .tv .info .biz
.com.cn .net.cn .org.cn .cn

中文域名查询：WWW. .

通用网址查询：

<%if InStr(TakenHTML,"No match") > 1 or InStr(TakenHTML,"Register system prompt")>1 or InStr(TakenHTML,"not been registered yet")>1 or InStr(TakenHTML,"没有找到这个条目")>1 or InStr(TakenHTML,"此域名没有被注册")>1 or InStr(TakenHTML,"没有查到符合条件的记录")>1 or InStr(TakenHTML,"信息不存在")>1 or InStr(TakenHTML,"Not Exist")>1 or InStr(TakenHTML,"NOT FOUND")>1 or InStr(TakenHTML,"你所查询的信息不存在")>1 or InStr(TakenHTML,"注册服务机构列表")>1 then %> 此域名以经注册了。。 <%else %>
以下是注册信息
<%=dowith()%>

<% end if %>