views:

9

answers:

1

Hi i want to login to Vbulleti**n Forum and save the first Topic of one thread which is in the " " html tag using **Java. i search the web and found many libraries that could login like httpComponent-Client, but i dont know how to get the data that is in the div . i need you to guide me on whole process and how to start. i think i should simulate login using HTTP headers and save the Cookie/session id then saving the threads first topic. here is the http header that i've got from Live HTTP Haders addon

 http://www.bamdad.dev/login.php

POST /login.php HTTP/1.1
Host: www.bamdad.dev
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://www.bamdad.dev/login.php?sid=5c9fa46899cadee7c9a7e6c1860b659a
Cookie: __utma=128554762.990000988595527300.1238095832.1280308800.1280311057.88; __utmz=128554762.1275402259.69.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); phpBB_WBB_t=a%3A1%3A%7Bi%3A3444313%3Bi%3A1280306666%3B%7D; __utmc=128554762; __utmb=128554762.3.10.1280311057; phpBB_WBB_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D; phpBB_WBB_sid=5c9fa46899cadee7c9a7e6c1860b659a
Content-Type: application/x-www-form-urlencoded
Content-Length: 82
username=bamdadd%40gmail.com&password=test&autologin=on&redirect=&login=Log+in
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 28 Jul 2010 10:55:25 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: close
Set-Cookie: phpBB_WBB_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A323A%221b694f2a9a1a401faa84ffe214f7cee6%22%3Bs%3A6%3A%22userid%22%3Bs%3A63A%22649455%22%3B%7D;
expires=Thu, 28-Jul-2011 09:59:02 GMT; path=/
Set-Cookie: phpBB_WBB_sid=5c9fa46899cadee7c9a7e6c1860b659a; path=/
Set-Cookie: phpBB_WBB_fpass=deleted; expires=Tue, 28-Jul-2009 09:59:01 GMT; path=/
Cache-Control: private, pre-check=0, post-check=0, max-age=0
Expires: 0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
A: 

i've done that with httpClient from Apache

Bamdad Dashtban