[Sunhelp] htaccess

Moshe Levy moshel at odigo.com
Wed May 31 13:32:33 CDT 2000


Hi,

I wrote a script in perl that retrieves some gif file from my web server
automatically. (via http)
now, i want to add an .htaccess file to my gif's web server home
directory. the problem is that i don't
know how to add the username and password information to the perl script
so it can still authenticate and
download the gif automatically.
Any idea how it can be done ?

This is the script part where it retrieve the file:

#!/usr/local/bin/perl

use HTTP::Request;
use LWP::UserAgent;

$GEO_FILE = "http://foo.com/foo.gif";

$ua = LWP::UserAgent->new;
$req = HTTP::Request->new(GET,$GEO_FILE);
$resp = $ua->request($req);
$rsp = $resp->content();


Thanks.







More information about the SunHELP mailing list