asp版域名查詢的數(shù)據(jù)庫(kù)接口_ASP教程
推薦:ASP常用函數(shù):LastDay()程序代碼 % '功能:判斷一個(gè)值是否存在于數(shù)組 '來(lái)源:http://www.cncms.com/asp.asp Function InArray( sValue, aArray ) Dim x InArray = False For Each x In aArray If x = sValue Then InArray = True Exit For End If Next End Function % 程序代碼 % '功能:判斷一
<%
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 ("<script>alert('看看您什么忘記填寫了?沒(méi)有填寫域名吧?');javascript:history.back(1)</script>")
response.end
end if
'TakenHTML = GetURL("http://www.internic.net/cgi/whois?whois_nic="&Domain&"&type=domain")
TakenHTML = GetURL("http://www.china-channel.com/checkdomain.asp?action=whois&domain=" & Domain)
d_exsit=1
if InStr(TakenHTML,"No entries") > 1 then
Response.Write Domain & "出錯(cuò)了,請(qǐng)返回!<br><br>"
else
if InStr(TakenHTML,"No match") > 1 then %>
祝賀您,您想注冊(cè)的域名 <% =Domain %> 還沒(méi)有被注冊(cè)<p><a href="#" >
點(diǎn)擊這里,開(kāi)始注冊(cè)您的域名</a></p></font>
<% else %>
<font color="red"><br>很抱歉</font> 您想注冊(cè)的域名 <% =Domain %> 已經(jīng)被注冊(cè)了!<p></p>請(qǐng)您換個(gè)域名再試</font>
<form method="post" action="search.asp" name="checkdomain" id=Form1>
www.<input type="text" name="domain" id=Text1>
<select name="ext" id=Select1>
<option value="com" selected>.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="com.cn">.com.cn</option>
<option value="net.cn">.net.cn</option>
<option value="org.cn">.org.cn</option>
<option value="cc">.cc</option>
<option value="tv">.tv</option>
<option value="biz">.biz</option>
<option value="info">.info</option>
</select>
<input type="submit" name="Submit" value="查詢" id=Submit1 onClick = "return submitchecken();">
</form>以下是此域名的詳細(xì)注冊(cè)信息<BR></font>
<table><tr><td><PRE><% =dowith() %></PRE></td></tr></table></font>
<% end if
end if
Function dowith()
Dim lStrURL
Dim pagebefore
Dim pageafter
Dim tempcontent
Dim pagestart
Dim pageend
dim temps
pageafter = "<PRE>"
pagebefore = "</PRE>"
tempcontent = TakenHTML
if d_exsit<>0 then
pagestart = InStr(1,tempcontent, pageafter,1)
If pagestart = 0 Then
dowith = "<font color=""red"">意外的錯(cuò)誤2!</font>"
d_exsit = 3
Exit Function
Else
pagestart = pagestart + Len(pageafter) + 1
pageend = InStr(pagestart, tempcontent, pagebefore,1)
If pageend = 0 Then
dowith = "<font color=""red"">意外的錯(cuò)誤!</font>"
d_exsit = 3
Exit Function
Else
pageend = pageend - pagestart '得到內(nèi)容長(zhǎng)度
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 = tempcontent
End If
End Function
%>
分享:ASP常用函數(shù):CheckBoxScript()程序代碼 % '功能:用來(lái)在指定CheckBox的哪幾個(gè)值上打勾 '來(lái)源:http://www.cncms.com/asp.asp Function CheckBoxScript(ByVal FormElement , ByVal ElementValue) CheckBoxScript = scr ipt language=javascript type=text/Javascript vbCrLf String.PRototype. CheckBo
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- 如何用ASP對(duì)網(wǎng)頁(yè)進(jìn)行限制性的訪問(wèn)
- ASP實(shí)現(xiàn)一行多列顯示方法實(shí)例程序
- Asp中代碼與頁(yè)面的分離
- 經(jīng)典!5分鐘編寫一個(gè)ASP論壇
- 淺析asp無(wú)組件上傳并插入到數(shù)據(jù)庫(kù)里
- FileSystemObject 示例代碼
- 用存儲(chǔ)過(guò)程實(shí)現(xiàn)數(shù)據(jù)分頁(yè)Asp
- 初學(xué)者來(lái)認(rèn)識(shí)OLEDB和ODBC的區(qū)別
- 淺談ASP編程的思路與糾錯(cuò)
- ASP基礎(chǔ)教程之實(shí)例學(xué)習(xí)ASP Response 對(duì)象
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-asp版域名查詢的數(shù)據(jù)庫(kù)接口
。