[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] perl, LWP og .htaccess



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Møller Pedersen wrote:

| Jeg har brugt LWP::Simple i mange perl-script til automatisk download fra
| websider og det virker ganske fint.
|
| Men hvad gør man, hvis der er brugt .htaccess i et directory ? Jeg
kender godt
| username og password og har ingen problemer med at download manualt
vha. lynx.
| Jeg har søgt på CPAN, men ikke rigtigt kunne finde det rigtige module.
|

Du kan f.eks. bruge HTTP::Request og LWP::UserAgent. Noget i retning af
følgende skulle virke:

my $ua = new LWP::UserAgent;
my $req = new HTTP::Request(GET => 'http://my.url/');
$req->authorization_basic('username', 'password');
my $response = $ua->request($req);

unless ($response->is_error()) {
~    print $response->as_string, "\n";
}

Du kan med fordel lige checke man-siderne for disse perl packages.

- --Anders
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCPHYnzxiV4jcxCUkRAqiWAJ4oQcyijl1hQbN35TDMCHO7e2gtOgCeMqPi
8SWNPDiDzA2Tug+GLzlleag=
=G4tp
-----END PGP SIGNATURE-----


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *