Results 1 to 2 of 2
- 05-28-2011, 06:13 PM #1Member
- Join Date
- May 2011
- Rep Power
N00b questions - downloading files from a website
I am attempting to write my first Java program from scratch. My goal is to get it to 1) connect to a certain website, 2) download an MP3 file and 3) add it to an iTunes playlist. I accomplished step #1 using URL and URLConnect instances. Now I am on step #2, which requires me to enter login information before I can download the file. So my question is: how do I instruct the program to enter my username and password into the respective fields? I am not necessarily looking for explicit coding instructions, just general guidance on what topics I need to look up and read about. Any advice would be appreciated.
- 05-28-2011, 06:30 PM #2
If you are downloading an HTML page that contains a <FORM tag that you want your program to "fill-in" and return to the server, you need to understand what the browser sends back to the server when it loads an html page with a forum and the user fills in the fields and presses submit.
I assume that you want your program to "simulate" a browser with a user.
If you can get a simple HTTP server that will show you its traffic, or some plug-in for a browser that shows the traffic, it would be easy to see what is sent by the browser.
- By yap_1991 in forum New To JavaReplies: 12Last Post: 07-26-2010, 10:59 AM
- By Lil_Aziz1 in forum New To JavaReplies: 13Last Post: 06-05-2010, 09:44 AM
- By deb_santanu in forum Advanced JavaReplies: 0Last Post: 11-13-2008, 02:04 PM
- By jklsemicolon in forum NetworkingReplies: 10Last Post: 08-08-2008, 07:21 AM
- By Albert in forum Java AppletsReplies: 1Last Post: 07-05-2007, 06:09 AM