Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws IOException {
- URL url = new URL(URL);
- URLConnection uc = url.openConnection();
- uc.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
- uc.connect();
- InputStreamReader isr = new InputStreamReader(uc.getInputStream());
- BufferedReader br = new BufferedReader(isr);
- String line = "";
- String code = "";
- while((line = br.readLine()) != null) {
- code += line + "\r\n";
- }
- br.close();
- isr.close();
- System.out.println(code);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement