I need to grab the HTML code of some web page, for example, for http://javaranch.com,
the first lines would be:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>JavaRanch - A Friendly Place for Java Greenhorns</title>
And so on. Does anyone know how to do this? Is this even possible? I would really appreciate any tips. I've been trying with URLConnection and HttpURLConnection, but I don't see any method to get the HTML code.
Thanks a lot!