書くのは非常に簡単ですが、機能を実装するだけです
<%
functionformaturl(はい)
ifmid(はい、5,1)<> "" then
はい1 =左(はい、3)
はい2 =右(はい、cint(len(yes))-3)
formaturl = yes1& "。"&yes2
それ以外
formaturl = yes
endif
エンド機能
'リモートWebページのバイナリソースコードを取得します
functiongetboy(url)
'onerrorresumenext
setobjxml = server.createObject( "microsoft.xmlhttp")
withousbjxml
.open "get"、url、false ""、 "
。送信
getBoy = .ResponseBody
終わりに
getboy = bytestobstr(getboy、 "gb2312")
setobjxml =何もありません
エンド機能
'バイナリストリームコードの処理
functionbytestobstr(strbody、codebase)
DimobjStream
setobjstream = server.createObject( "adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writesstrbody
objstream.position = 0
objstream.type = 2
objstream.charset = codebase
bytestobstr = objstream.readtext
objstream.close
setobjstream =何もない
エンド機能
%>
未登録のドメイン名は次のとおりです
<%
'www.knowsky.comクエリが送信された場合
ifrequest.form( "yes")<> "" then
はい=交換(request.form( "yes")、 ""、 "") 'チェックボックス文字列のスペースを削除します
はい= split(yes、 "、") 'はいの配列をインスタンス化し、yesのコンマ分離された配列をyesの新しい配列に割り当てます
fori = 0toubund(yes) 'アレイループの開始を転送します
url = "http://panda.www.net.cn/cgi-bin/check.cgi?domain="&request.form( "domain")& "&ext ="&yes(i)
wstr = getBoy(url) 'クエリ後にソースコードを取得します
IFSTR(WSTR、 "Unregisteredドメイン名")<> 0then '登録ドメイン名であるかどうかを決定します
Response.Writerequest.form( "domain")& "
endif