Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 2nd, 2013  |  syntax: Java  |  size: 0.40 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.io.*;
  2. import java.net.*;
  3.  
  4. public class Koen {
  5.         public static void main(String[] args){
  6.                 try{
  7.                         URL myUrl = new URL("http://www.hackthissite.org/");
  8.                         BufferedReader br = new BufferedReader(new InputStreamReader(myUrl.openStream()));
  9.                         String temp;
  10.                         while((temp = br.readLine()) != null)
  11.                                 System.out.println(temp);
  12.                 }
  13.                 catch (Exception e){
  14.                         e.printStackTrace();
  15.                 }
  16.         }
  17. }
clone this paste RAW Paste Data