Dim strPage
Function" />
時(shí)間:2023-01-28 23:00:01 | 來源:建站知識
時(shí)間:2023-01-28 23:00:01 來源:建站知識
前兩天想寫一段同ip反查域名的代碼,在很多網(wǎng)站上找了半天,最后在一個(gè)英文站上看見可以通過live.com的搜索結(jié)果提取此類信息,于是寫了下面一段:程序只是測試成功,沒有進(jìn)行優(yōu)化,查詢效率有點(diǎn)低!
<%
Dim strPage
Function GetPage2(Path)
t = GetBody(Path)
GetPage2=BytesToBstr(t,"GB2312")
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Public Function GetDomain(TempStr,matchstr)
set reg=new Regexp
reg.Multiline=True
reg.Global=True
reg.IgnoreCase=true
reg.Pattern=matchstr
Set matches = reg.execute(TempStr)
For Each match in matches
if not instr(GetDomain,match.Value)>0 then
GetDomain=GetDomain&match.Value
end if
Next
End Function
dim i
for i=1 to 15
strPage=strPage&GetPage2(""&i&"1")
next
strPage=GetDomain(strPage,"(.*?)//")
strPage=replace(strPage,"","
")
strPage=replace(strPage,"<<","<")
strPage=GetDomain(strPage,"<li(.*?)//li>")
response.write strPage
%>
來自:www.cnwebmaster.info演示:(臨時(shí)演示地址)
提示“網(wǎng)站綜合信息查詢工具”本人正在開發(fā)!屆時(shí)你只需要輸入一個(gè)域名將得到很多有關(guān)于這個(gè)域名的信息!不需要象有些網(wǎng)站一樣,查個(gè)東西需要輸入很多次!
交流請聯(lián)系QQ:39100642
關(guān)鍵詞:
客戶&案例
營銷資訊
關(guān)于我們
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。