JSP Implementation of the thief Program

Source: Internet
Author: User

I graduated more than half a year...

I used to work hard at school. After graduation, I began to devote myself to the programming world. However, I still have a low length of service and lack of experience. I only knew a month ago that there were thieves.ProgramHaha

How can we implement this? Isn't it possible to access other people's databases? Later, I checked the information and found out that I had read the webpage files of other people, filtered the keywords, and crawled the required information ..... The name is really an image .. Thief Program

Haha, I was suddenly interested a month later. I studied it with JSP and found that the original thief could be so simple .... It's almost just reading files, but it's just changing to remote.

CodeAs follows:
========================================================== ========================================
<% @ Page Language = "Java" pageencoding = "UTF-8" %>
<% @ Page import = "Java. Io. *, java.net. url" %>
<%
URL url = new URL ("http://www.itpub.net"); // create a URL object and instantiate it as a URL to get the address of the web page to be crawled
Bufferedreader reader = new bufferedreader (New inputstreamreader (URL. openstream (), "gb2312"); // create a bufferedreader object and instantiate it as reader. Here, gb2312 is the webpage encoding format to be crawled.
While (reader. Ready ())
{
Out. println (reader. Readline ());
}
Reader. Close ();
%>

The content of the webpage has been captured here. As for what content is needed, I will not describe the specific screening. The specific requirements are implemented.

Related Article

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.