hello all,

I'm working on a project, which uses the LWP::UserAgent module, and all is working fine untill we had to password protect a folder with a .htaccess file, on the remote server. Now we can't grab the file from the remote server, without the passing the proper access information.

Script SniP;

my $fileURL   = "http://www.some_domain.com/folder/some_file_name";;
my $capture    = undef;
my $ua         = new LWP::UserAgent;
my $req        = new HTTP::Request 'GET' => "$fileURL";
my $res        = $ua->request($req);

   if ($res->is_error()) { print qq~Unable to Grab file~; exit(); }
     if ($res->is_success()) { $capture = $res->content(); }
       if (defined($capture)) {
          # do some stuff here with the file content.
         }

this script resides on a different server, grabs and processes various files from a remote server. as I say, it was working file until the "/folder" was password protected, now, naturally we can't unless we pass the access info in order to grab the files.. It seems to me that this can be done with the LWP modules, but I haven't been able to find the right method to do this... can this be done, if so, please direct me to the appropriate information or a sample code if possible.

TIA
--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to