How to collect static article system _ Thieves/Collection

Source: Internet
Author: User
At present, the site basically generated static, for those who technology is not very sophisticated thieves, to steal a filename is the time plus random number to name the
Article system, a little difficult, and most of the current static systems are named in this way, this is not like the asp?id=1 to asp?id=100 so good
This name is not regular, then, this article system how to pick it, the following to their own station www.asp315.comThis example is to write an article on the collection of static text
Chapter of the System Tutorial bar!
First, we open www.asp315.comYou will find that a lot of tutorials, we casually point a go in, on the point of JSP tutorial, which also divided the subclass, this regardless
We're going to take this big class, http://www.asp315.com/artical/2/1.htm, look at the name of each article, basically is not the law, direct steal is no chance
, can only turn to steal, see this category page below has next page, look at these pages of the law, will find is named after 1.htm,2.htm, so much better to do
Click on the last page, 141.htm, these pages are the same, the entire station of the classification page is the same, as long as the finished this page, then, the article page file name will know
Just write down the file name, then, it is easier to steal, here I only say how to steal these file names, not to tell the specific collection of a page, because that is too simple
I don't need to say, everyone will!
Home, that read remote function is not less, I posted the following
Function Gethttppage (Path)
t = GetBody (Path)
Gethttppage=bytestobstr (T, "gb2312")
End Function

Function getbody (URL)
On Error Resume Next
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open "Get", url, False, "", ""
. Send
GetBody =. Responsebody
End With
Set retrieval = Nothing
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
Then we first write a simple program to first, step-by-step, hands-on teaching, (ah, nonsense to say more *.*)
Name the above code get.asp.
Another page code is called Getfilename.asp bar. The code is as follows:
<!--#include file= "get.asp"-->
<%
Response.Write Gethttppage ("http://www.asp315.com/artical/2/1.htm")
%>
Ah, Getfilename.asp finished, of course, this is the simplest copy of it, we have to step by step to change, to improve,
Travel that when the code, you will see and that page basically one page, of course, some pictures can not show!
Then we analyze this page, homepage, right click, view source code find this line
&LT;TD width= "height=" align= "center" bgcolor= "#F6F6F6" > Popularity </td>
Of course, we do not want so much, light popular word can be, but for insurance, we still have more points,
This is where the title of the file begins, and then we find the end of the place,
&LT;TD width= "490" align= "Center" > pages
Ah, the code found, this more than a little bit of nothing, we code to step by step perfect,
Then we'll change the getfilename.asp into
<!--#include file= "get.asp"-->
<%
Dim dj,l1,l2
Dj=gethttppage ("http://www.asp315.com/artical/2/1.htm")
L1=instr (DJ, "<td width=" "", "height=" "," "align=" "Center" "bgcolor=" "#F6F6F6" "> Popularity </td>")
L2=instr (L1,DJ, "<td width=" "490" "align=" "Center" "> Pages")
Dj1=mid (DJ,L1,L2-L1)
Response.Write dj1
%>
Then run this file and take a look at it,
You will find a lot less, ah, also simple much, then, we find the law to come, the same view of the source code,
Then you'll find that each one of them is made up of a <tr></tr> tag, which is much better,
Djmore=split (dj1, "<tr>")
Remember, take a closer look, and you'll find a few more <tr>
Then get rid of the first and the last two and become like this.
Let's loop.
Put
Response.Write Dj1 Replaced
Djmore=split (dj1, "<tr>")
For I=1 to UBound (Djmore)-2
Response.Write Djmore (i)
Next
This will separate each line, divided into the following
&LT;TD width= "474" height= "bgcolor=" #FFFFFF "> <a href=". /.. /news/31/200572111233207984.htm "target=" _blank "title=" CSS Grammar Manual (i) Font properties ">css Grammar Manual (i) Font properties </a></td>
&LT;TD width= "height=" align= "center" bgcolor= "#FFFFFF" >2005-7-21</td>
&LT;TD width= "height=" align= "center" bgcolor= "#FFFFFF" ><script src= ". /.. /showcount.asp?id=18152 "></script></td>
</tr>
Now it's a lot easier to analyze this section,
Let's write a code for one of the Djmore (i) arrays.
L3=instr (Djmore (i), "<a href=")
L4=instr (L3,djmore (i), "" "target=" "_blank" "")
Url=mid (Djmore (i), L3,L4-L3)
Response.wrie url& "<br>"

This is done for convenience,
Add the above to the previous
Response.Write Djmore (i)
here <BR> is to change lines, look good, and then you see the URL seems to have something more, This we're going to do some processing, to turn
Url=mid (Djmore (i), l3,l4-l3) into
Url=mid (Djmore (i), L3+len ("<a href=") +1,l4-l3-len ("<a Href= ")-1
Oh, no problem, and then run on the remaining address,
Ah, yes, this is just every page, to all, you just modify the
Dj=gethttppage (" http://www.asp315.com/artical/2/1.htm ") to
for Ii=1 to the"
Geturl= "

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.