Unable to Retrieve HtmlCode
Hello,
I am trying to retrieve html souce of webpages.The following code works fine for most of the Url's....
URL url = new URL("http://www.coupons-coupons-codes.com/search.asp");
InputStream ins=url.openStream(); // read the content of the url
BufferedReader in = new BufferedReader( new InputStreamReader(ins));
String inputLine,htmlCode;
while(( (inputLine = in.readLine()) != null)){
htmlCode.append=in.readLine();
}
System.out.println(htmlCode);
But some times its not retrieving html code...example of such url is "http:\\www.fetckbook.info","http://www.coupons-coupons-codes.com/search.asp"..
Can anyone help me in this...
Thanks in advance,
Ravi

