The main advantage is that no need to manually add a lot of information, you can designate a station information interception for batch input, to save time and effort. Unlike the Simple ASP Thief program, it is no longer dependent on its target site.
Reference code:
Copy Code code as follows:
<%
' Declares a function that obtains the target information, which is implemented through an XML component.
Function Geturl (/blog/url)
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open ' get ', url, False
. Send
GetURL = Bytes2bstr (. responsebody)
' Verify the acquisition information, if the information length is less than 100, the interception failed
If Len (. responsebody) <100 Then
Response.Write "Get remote file <a href=" &url& "target=_blank>" &url& "</a> failed. "
Response.End
End If
End With
Set retrieval = Nothing
End Function
' Binary turn string, otherwise there will be garbled!
function Bytes2bstr (VIN)
Strreturn = ""
For i = 1 to LenB (VIN)
Thischarcode = ASCB (MidB (vin,i,1))
If Thischarcode < &h80 Then
Strreturn = Strreturn & Chr (Thischarcode)
Else
Nextcharcode = ASCB (MidB (vin,i+1,1))
Strreturn = Strreturn & Chr (CLng (thischarcode) * &h100 + CInt (nextcharcode))
i = i + 1
End If
Next
Bytes2bstr = Strreturn
End Function
' Declaration of interception format, from start to intercept, to last to end
Function Getkey (Html,start,last)
Filearray=split (Html,start)
Filearray2=split (Filearray (1), last)
Getkey=filearray2 (0)
End Function
Dim Softid,url,html,title
' Get the ID of the page you want to take
Softid=request ("Id")
Url= "http://www3.skycn.com/soft/" &SoftId& ". html"
Html = Geturl (/blog/url)
' Software name for intercepting Sky Software as an example
Title = Getkey (Html, "<font color= ' #004FC6 ' size= ' 3 ' >", "</font></b></td></tr>")
' Open database, prepare for storage
Dim connstr,conn,rs,sql
Connstr= "dbq=" +server.mappath ("Db1.mdb") + ";D efaultdir=;D river={microsoft Access DRIVER (*.mdb)};"
Set Conn=server.createobject ("ADODB. CONNECTION ")
Conn.Open ConnStr
Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT [column name] from [table name] where [column name]= '" ' &Title& ' "
Rs.Open sql,conn,3,3
If rs.eof and Rs.bof then
RS ("column name") =title
Rs.update
Set rs=nothing
End If
Set rs=nothing
Response.Write "Collection completed!"
%>