Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Answer: How do I retrieve .htpasswd protected html documents?

by KM (Priest)
on Oct 12, 2000 at 21:00 UTC ( #36438=categorized answer: print w/replies, xml ) Need Help??

Q&A > HTTP and FTP clients > How do I retrieve .htpasswd protected html documents? - Answer contributed by KM

Yes, you sure can. Use LWP::UserAgent:

use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = new HTTP::Request 'GET', 'http://www.you.com/dir'; $req->authorization_basic('userid', 'password'); my $result = $ua->request($req)->as_string;

Read the POD for the module, as well as lwp-cook for other options/uses.

Cheers,
KM

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
NodeReaper says "Shhhh! Be vewy vewy quiet, I'm hunting wumpus"

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2017-03-26 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (313 votes). Check out past polls.