![]() |
|
Do you know where your variables are? | |
PerlMonks |
htaccess type authorization with WWW::Mechanizeby davido (Cardinal) |
on Dec 13, 2004 at 07:39 UTC ( #414329=perlquestion: print w/replies, xml ) | Need Help?? |
davido has asked for the wisdom of the Perl Monks concerning the following question: I've read the POD for WWW::Mechanize, and done a bit of searching and reading here at the Monastery, but haven't been able to come up with a solution to what I believe is probably a pretty simple question. I want to log in to an htaccess-protected site via WWW::Mechanize. As an example of such a site I have been trying to log in to my router's configuration page. Here is a simple example script, which isn't successful:
The output is:
Note: The URL I'm using is automatically trapped by my router and associated with the router's configuration screen. I could also have just used the router's local IP address of 192.168......etc. I know this can't be that difficult. After all, WWW::Mechanize is a proper subclass of LWP::UserAgent, but I just can't seem to quite get it right. Any suggestions or pointers to a good discussion on the topic would be greatly appreciated. Dave
Back to
Seekers of Perl Wisdom
|
|