File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
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.

Bill
Venkat Sadasivam
Ranch Hand

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

http://httpunit.sourceforge.net


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

Joined: Mar 22, 2005
Posts: 42951
    
  72
I like jWebUnit (also on SourceForge). It operates at a higher level than either HttpClient or HttpUnit, so you have to write less code.
 
Don't get me started about those stupid light bulbs.
 
subject: Login to a website