传奇发布网站的采集代码应该怎么写

我已经有一个网站的源代码 可是里面没自己采集的代码
我怎么给自己添加一个 自己采集的代码
求高手帮忙 非常感谢

<%end if
if request.QueryString("action")="caiji" then
dim Trs,sql,i,Texts
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True Or HttpUrl="$False$" Then
GetHttpPage="$False$"
Exit Function
End If
Dim Http
Set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",HttpUrl,False
Http.Send()
If Http.Readystate<>4 then
Set Http=Nothing
GetHttpPage="$False$"
Exit function
End if
GetHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
Set Http=Nothing
If Err.number<>0 then
Err.Clear
End If
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

Texts=GetHttpPage("http://www.www.com/cj.asp")
dim T1,T2,t3 : t3=0
if instr(Texts,"<body>")>0 then
Texts=mid(Texts,instr(Texts,"<body>"))
Texts=mid(Texts,1,instrrev("</body>"))
end if
t1=split(texts,"<br>")
t3=ubound(t1)
for i=0 to ubound(t1)-1
t2=split(t1(i),"{}")
if ubound(t2)=23 then
'写入数据库
sql="select * from Gq_sfdata where ip='" & t2(2) & "'"
Set Trs = Server.CreateObject("ADODB.recordset")
trs.CacheSize=20
trs.open sql,conn,1,3
if trs.eof then
trs.addnew
for i1=1 to 21 : if not isnull(t2(i1)) then trs(i1)=t2(i1) :end if : next
trs(22)=3
trs("hits")=0
trs.update
response.Write t2(1) & " <font color=red >" & t2(5) &"</font> 添加成功<br>"
else
response.Write t2(1) & " <font color=red >" & t2(5) &"</font> 已存在<br>"
end if
'trs.close
end if
next
Erase t1
Erase t2
set trs=nothing
conn.close
set conn=nothing
response.Write "共采集了" & t3 & "条信息"
end if
%>
温馨提示:答案为网友推荐,仅供参考
相似回答