asp版域名查詢的數(shù)據(jù)庫接口
asp 版域名查詢的數(shù)據(jù)庫接口 = tempcontent
asp 版域名查詢的數(shù)據(jù)庫接口
<
on error resume next
PRivate d_exsit
Dim Retrieval
Dim Domain
Dim TakenHTML
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
Domain = Replace(Request.Form("domain"),"www.","") & "." & Request.Form("ext")
if Domain=".com" or Request.Form("domain")="" then
Response.Write ("")
response.end
end if
'TakenHTML = GetURL("http://internic.cn/cgi/whois?whois_nic="&Domain&"
&type=domain")TakenHTML = GetURL("http://www.wang027.com/checkdomain.asp?action=whois&domain=" & if InStr(TakenHTML,"No entries") > 1 then
Response.Write Domain & " 出錯了, 請返回!
"
else
if InStr(TakenHTML,"No match") > 1 then >
祝賀您,您想注冊的域名 < =Domain > 還沒有被注冊
點(diǎn)擊這里,開始注冊您的域名
< else >
很抱歉 您想注冊的域名 < =Domain > 已經(jīng)被注冊了!
< =dowith() > |
< end if
end if
Function dowith()
Dim lStrURL
Dim pagebefore
Dim pageafter
Dim tempcontent
Dim pagestart
Dim pageend
dim temps
pageafter = "
""pagebefore = "
tempcontent = TakenHTML
if d_exsit<>0 then
pagestart = InStr(1,tempcontent, pageafter,1)
If pagestart = 0 Then
dowith = "意外的錯誤2!" d_exsit = 3
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 ' 得到內(nèi)容長度
,tempcontent = Mid(tempcontent, pagestart, pageend)
End If
End If
Set pageregexp = New RegExp
pageregexp.Global = True
pageregexp.Pattern = "<[^>]*>"
tempcontent = pageregexp.Replace(tempcontent, "")
Set pageregexp = Nothing
dowith
End If
End Function
> = tempcontent