复制代码代码如下 :
<%
dj54_path = "data/data.mdb" '数据库地址
setconn = server.createobject ( "adodb.connection")
connstr = "제공자 = microsoft.jet.oledb.4.0; dataSource ="& server.mappath (dj54_path)
conn.openconnstr
functiongethttppage (httpurl)
ifisnull (httpurl) = trueorhttpurl = "$ false $"
gethttppage = "$ false $"
종료 기능
endif
dimhttp
sethttp = server.createobject ( "msxml2.xmlhttp")
http.open "get", httpurl, false
http.send ()
ifhttp.readystate <> 4then
sethttp = 아무것도
gethttppage = "$ false $"
종료 기능
endif
gethttppage = bytestobstr (http.responsebody, "gb2312")
sethttp = 아무것도
iferr.number <> 0then
err.clear
endif
최종 기능 장애
functionbyTestObstr (body, cset)
Dimobjstream
setobjstream = server.createobject ( "adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.position = 0
objstream.type = 2
objstream.charset = cset
bytestobstr = objstream.readtext
objstream.close
setobjstream = 아무것도
최종 기능 장애
functionmymid (byvala_strstring, byvala_strpattern)
dimmm_objregexp
dimmm_strexecute
setmm_objregexp = newRegexp
withmm_objregexp
.pattern = a_strpattern
.ignorecase = true
.global = false
setmm_strexecute = .Execute (a_strstring)
ifmm_strexecute.count <> 0then
mymid = mm_strexecute (0) .submatches (0)
endif
끝
mymid = trim (mymid)
setmm_objregexp = 아무것도 없습니다
최종 기능 장애
functionreglistget (strn, patrn, mysky)
settempreg = newRegexp
tempreg.ignorecase = false
tempreg.global = true
tempreg.pattern = patrn
setMatches = tempreg.execute (str)
foreachMatchInMatches
Content = Content & Match.Value & Mysky
다음
reglistget = 컨텐츠
setMatches = 아무것도
settempreg = 아무것도 없습니다
최종 기능 장애
dj54_sf = gethttppage ( "http://www.haosf.com/")
DJ54_SF = REPLEC (DJ54_SF, VBCRLF, "")
DJ54_SF = REPLEC (DJ54_SF, chr (10), "")
dj54_sf = trim (mymid (dj54_sf, "zjkf.asp"& chr (34) & "> </script> (.+?) <scriptlanguage = javascriptrc ="& chr (34) & "txtj2.asp"& chr (34) & ">"))))
dj54_sf = reglistget (dj54_sf, "<cript> o (.+?) </script>", "bt54")
DJ54_SF = REPLEC (DJ54_SF, "/", "")
DJ54_BT54_SF = 분할 (DJ54_SF, "BT54")
response.write ""ff 采集当日 "& ubound (dj54_bt54_sf) -1 &"个 sf <br/> "
setrs = server.createobject ( "adodb.recordset")
sql = "select*fromsfdata"