01
<form action=
""
>URL:<input name=
"url_"
/><input type=
"submit"
name=
value=
"查詢"
/></form>
02
<%
03
If
Request(
)<>
Then
04
SenFe_GetUrl Request(
)
05
End
06
Sub
SenFe_GetUrl(sUrl)
07
Dim
sContent, sDomian, oTempReg, I, oMatches, cMatch, sUrl_
08
sUrl = LCase(sUrl)
09
Left(sUrl, 7)=
"http://"
10
sDomian = Mid(sUrl, 8)
11
Else
12
sDomian = sUrl
13
sUrl =
& Url
14
15
InStr(sDomian,
"/"
sDomian = Split(sDomian,
)(0)
16
sContent = SenFe_GetData(sUrl)
17
Set
oTempReg =
New
RegExp
18
With
oTempReg
19
.IgnoreCase =
True
20
.Global =
21
.Pattern =
"(http:(\/\/|\\\\)(([\w\/\\\+\-~`@:%])+\.)+([\w\/\\\.\=\?\+\-~`@\’:!%#]|(&)|&)+)"
22
oMatches = .Execute(sContent)
23
For
Each
cMatch
In
oMatches
24
sUrl_ = LCase(cMatch.Value)
25
InStr(sUrl_, sDomian)=0
26
Response.Write(sUrl_ &
"<br />"
& VbCrLf)
27
28
Next
29
30
Nothing
31
32
Function
SenFe_GetData(sUrl)
33
oXMLHttp :
oXMLHttp = Server.CreateObject(
"Msxml2.ServerXMLHTTP"
34
oXMLHttp
35
.Open
"GET"
,sUrl,
False
36
.SetRequestHeader
"Referer"
,sUrl
37
.Send
38
SenFe_GetData = SenFe_BytesToBstr(.ResponseBody,
"GB2312"
39
40
oXMLHttp =
41
42
SenFe_BytesToBstr(sBody, sCset)
43
oADOS :
oADOS = Server.CreateObject(
"Adodb.Stream"
44
oADOS
45
.Type = 1
46
.Mode = 3
47
48
.Write sBody
49
.Position = 0
50
.Type = 2
51
.Charset = sCset
52
SenFe_BytesToBstr = .ReadText
53
.Close
54
55
oADOS =
56
57
%>
學習目的:學會ACCEES數據庫的使用,並建立一個將來要用
自從買了PPC以後每
摘要:當收集客戶對Visual Studio&n
由於我們要操作數據庫,要使用到ADO,因此我們要引用Mic
作為動態網站在建設過程中難免遇到在線編輯文章的問題。HTM
為了提高網站的速度,公司服務器換了Windows2008