Posted By

kvaso on 04/13/10


Tagged


Versions (?)

titulky


 / Published in: Java
 

  1. String url = "www.titulky.com";
  2. URLConnection conn = new URL(url).openConnection(); //otvorim connection
  3. conn.setRequestProperty("Cookie", "_data=blabla; _sid=3307dbcb670704b282aa9a329d495153"); //nastavena cookie - lkazda polozka, ktora je ulozena v cookie je oddelena bodkociarkou
  4. conn.setRequestProperty("User-Agent", "MSIE");//nastavenie prehliadaca - optional
  5. BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); //a uz citam html

Report this snippet  

You need to login to post a comment.