Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-23-2004, 10:02 AM   #1
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Rep: Reputation: 30
wget through an authenticated website

We require to download data automatically from a third party HTTP server, which has usernaem/password authentication (controlled by a jsp). Can this be done with wget?

Old 09-23-2004, 10:52 AM   #2
Registered: Aug 2004
Posts: 44

Rep: Reputation: 15
wget can do HTTP Basic authentication use the --http-user and --http-password authentication parameters.

If the JSP page does not use HTTP authentication but rather some type of custom authentication based on GET and POST requests, you may be in a little trouble. I don't think wget keeps any state or cookies between requests.

If the latter is the case, I would look into some type of Perl or Java HTTP Client software.

Good luck.
Old 02-11-2009, 04:57 AM   #3
LQ Newbie
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
You can use --post-data option with --save-cookies option and reuse the saved cookies for the later requests.

wget --save-cookies cookies.txt \
--post-data 'user=foo&password=bar' \

# Now grab the page or pages we care about.
wget --load-cookies cookies.txt \
-p url


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mplayer can't be authenticated howarddevore Ubuntu 3 07-30-2005 07:56 AM
wget - retrieving one folder of website davidhayter Linux - Software 4 03-07-2005 08:20 PM
cyrus-imap: can be authenticated but can't login? Chowroc Linux - Networking 0 01-02-2005 04:38 AM
Linux to be authenticated from Win 2000? sikandar Linux - Enterprise 7 09-27-2004 11:24 AM
Postfix Authenticated mail servers MaverickApollo Linux - Software 1 01-06-2004 03:23 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration