I need to download a file from a website which has a URL formatted like:
http://www.server.com/downloads/1234/
This redirects to a .zip file which has to be saved. There is also a need to authenticate based on username and password.
I tried to use wget
, curl
and lynx
with no luck.
UPDATE:
wget
doesnt work with redirection. It simply downloads the webpage instead of the zip file.curl
gives the error "Maximum redirection exceeded > 50 "lynx
also gives the same error.