Rahat Syed

Greenhorn
+ Follow
since Dec 03, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rahat Syed

Hi,

I want to access and login to https://alta.registries.gov.ab.ca/SpinII/Logon.aspx website. But when I try to access this page, it redirects me to error page and ask to download IE browser. Can anybody help me? Follwoing is the code.

DefaultHttpClient httpclient = new DefaultHttpClient();

HttpGet httpget = new HttpGet("https://alta.registries.gov.ab.ca/SpinII/Logon.aspx");

HttpResponse response = null;

response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();

System.out.println("Login form get: " + response.getStatusLine());
if (entity != null) {
InputStream instream = entity.getContent();

BufferedReader reader = new BufferedReader(
new InputStreamReader(instream));

while((strLine = reader.readLine()) != null){
strPage += strLine;
}
System.out.println(strPage);
//pdfFiles = getPDF(strPage);
entity.consumeContent();

}