File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Login to a website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Login to a website" Watch "Login to a website" New topic

Login to a website

Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
Hi friends,

I am developing a small program to login to a website created using PHP,and to download some data from that website.I had not yet started doing these.I need your help to start this.

1)I want to know how can I login to a PHP website only knowing the URL.I created a username and password.I check by login with that user name.The data is not sending using query string.In the url there is no change is happening.

Please give Some idea to proceed.

Thanks in Advance

J 4 Java
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
1. This is certainly not an advanced question.
2. The Apache commons HttpClient toolkit is probably your best bet for emulating a browser client. Read the tutorial.

Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
HttpUnit also handy for these type of requirements.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
I like jWebUnit (also on SourceForge). It operates at a higher level than either HttpClient or HttpUnit, so you have to write less code.
I agree. Here's the link:
subject: Login to a website
jQuery in Action, 3rd edition