I assume you are looking for a "simple" way of doing this just real quick so you're going to want a scripting language.
Were I to do this, I would use Python and the urlgrabber.
http://linux.duke.edu/projects/urlgrabber
urlgrabber has some benefits over urllib2 or pycURL.
You could also use jython to get quick access to lots of fun Java libraries that handle XML/HTML and database (JDBC) and HTTP.
Regards, Greg