I am trying to create a java program that will log in to a PHP web forum, then navigate to a page that can only be accessed by a logged in user and finally printout the HTML source code for that page. I have been trying to figure out a solution to this problem to no avail. I would consider myself a novice programmer (I took some classes several years ago).
I think the problem that I'm running into has to do with handling cookies. After failing to figure this out from scratch, I came across the HTTPClient package and I have been trying to run their log in example found at HTTP Client Example however that doesn't seem to work. Can anyone point me in the right direction or give me an idea of where I am going wrong. Any insight is very appreciated as I'm very frustrated right now. Thanks.
Okay I decided to use HTMLUnit as suggested. I'm still not getting it to print out the "hidden" URL so far. I created an example user name and password on a random forum for testing. Any advice? Thanks.