Server.scripttimeout = 5000
'on error resume next setset conn = server.createObject ("adodb.connection") conn.'Open "provider = microsoft.jet.Oledb.4.0; data source =" & Server.mappath ("getit.mdb") set = server .CreateObject ("adoDb.recordset") SQL = "Select * from data" rsopen sql, conn, 1, 3
DIM COMEFROM, Myerr, Mycount
'==================================================== ======= ComeFrom = "http://www.xxx.com/u.asp?id=" myerr1 = "This information does not exist" MYERR2 = "This information has been hidden" '====== ============================================================================================================================================================================================================= '********************************************************** ************** 'only needs to change the initial INTMIN and end point INTMAX here, setting a running interval INTSTEP' is set to 50,000. It is estimated for more than two hours. During the period, artificial intervention is not required, '******************************************************************* ******************** INTMIN = 0INTMAX = 10000 'setting step length INTSTEP = 100
'==================================================== ========= 'The following code should not change' ==================================== ======================= Call getPart (intmin) response.write "" & INTMIN & "between" & INTMIN & "~~" & INTMAX & " Data "rs.close set = NothingConn.closeset conn = Nothing%> body> html> <% 'Using XMLHTTP to capture the address and transfer content processing Function getBody (URL) DIM Objxml on error resume next set objxml = CreateObject ( "Microsoft.XMLHTTP") With objXML .Open "Get", Url, False, "", "" .Send GetBody = .ResponseBody End With GetBody = BytesToBstr (GetBody, "GB2312") Set objXML = Nothing End Function ' Adodb.Stream binary data using Function BytesToBstr (strBody, CodeBase) dim objStream set objStream = Server.CreateObject ( "Adodb.Stream") objStream.Type = 1 objStream.Mode = 3 objStream.Open objStream.Write strBody objStream.Position = 0 objstream.type = 2 objstream.charset = codebase bytestobstr = Objstream.readte Xt objstream.close set objstream = Nothingend function '