develooper Front page | perl.libwww | Postings from July 2001

Getting past the File Download screen

Thread Next
From:
gtilton2
Date:
July 31, 2001 09:48
Subject:
Getting past the File Download screen
Message ID:
OF1B869ABE.60140E13-ON85256A9A.005AA637@com
I am new and inexperienced and can't find a way to get past something that
is probably pretty simple.  So here is my problem:
I have always used the following script to download files:
          $user_agent=new LWP::UserAgent;
          $user_agent->timeout([$secs]);
          $request=new HTTP::Request("GET","${urlfilename}");
          $request->authorization_basic("${username}","${password}");
          $response=$user_agent->request($request);

          if ($response->is_success)
          {
          open (DOWNLDFILE, ">${datadir}/$filename") || die ("Cannot open
date file ${datadir}/$filename: $!");
          print DOWNLDFILE $response->{_content};
          close DOWNLDFILE;
          }

The script is not working for the url I am now trying to access.  I have
taken the urlfilename to the internet browser to see if the url address is
the problem.  The urlfilename returns the Microsoft File Download menu
asking me whether I want to open the file to the current location or save
to a disk.  I'm thinking that this may be what is blocking my download.  Am
I right?  If so, how do I get around this?

(Sorry about the simple question.  I can tell by reading the messages on
this listserv that most of you are lightyears ahead of me.  I have been
reading as much as I can on the cpan web site.  If you point me in the
right direction and give me a kick I'd appreciate it.)
Thanks,
Greg


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About