| | |
Logging into to a site
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hey guys, i'm having some trouble using wget. What i'm trying do is log into a site, once its logged is to go to a certain link. And once it is there download all the files on the page, but check back later to see if any new ones are there. So far i've made up this:
Whenever i attempt to use --user=USER and --password=PASS it does not log me in to the site i am using, that is my main obstacle right now. What do you guys suggest i do?, Thanks. Clipper34.
Shell Scripting Syntax (Toggle Plain Text)
#!/bin/sh start() [--user=USER --password=PASS -A .pdf,.doc -r -Nc http://google.com] new() [$new_file = wget --user=USER --password=PASS -N -A.pdf,.doc -r -Nc http://www.google.com] if [start()] then echo Downloading files... if [new()] then echo Found new files!...Downloadi
Whenever i attempt to use --user=USER and --password=PASS it does not log me in to the site i am using, that is my main obstacle right now. What do you guys suggest i do?, Thanks. Clipper34.
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Hey There,
It might have to do with the user agent string that wget passes to the site (I think it's something like wget-version). You can manipulate the --user-agent= variable to pass anything, just be careful that you don't use Mozilla as they're litigation happy (more details on the options page on wget's site regarding getting sued by them)
That's just one possibility.
Hope it helps
, Mike
It might have to do with the user agent string that wget passes to the site (I think it's something like wget-version). You can manipulate the --user-agent= variable to pass anything, just be careful that you don't use Mozilla as they're litigation happy (more details on the options page on wget's site regarding getting sued by them)
That's just one possibility.
Hope it helps

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Similar Threads
- Need to access the secure page of another site (PHP)
- IIS logging (Windows Servers and IIS)
- Forum lurkers, introduce yourself ... !! (Community Introductions)
- Need Help for DNS Problem and 'about:blank' Problem ... (Viruses, Spyware and other Nasties)
- How to prevent visitors from bookmarking your site? (HTML and CSS)
- Internet explorer problems (Web Browsers)
- Difference (Web Browsers)
Other Threads in the Shell Scripting Forum
- Previous Thread: Change Destination in Conifgure of Installation
- Next Thread: retrieving username and password
| Thread Tools | Search this Thread |
Tag cloud for Shell Scripting





