linneighborhood has asked for the wisdom of the Perl Monks concerning the following question:
Above code works perfectly fine for downloading the files.#################### Download my $ua = new LWP::UserAgent(agent => 'MyAgent/1.0') or die "Error: Can +not create object"; $ua->proxy([qw(http https ftp)] => 'http://proxyhost:8080') or die "Er +ror: Problem with Proxy"; my $response = $ua->get('ftp://ftpuser:password@ftp.host.name/remotefi +le.zip', ':content_file' => localfile.zip) or warn "Warn: Failed to d +ownload file from FTP Server "; if ($response->is_success) { print "Found file on remote server \n"; } else { print "File missing on remote server \n"; } #####################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to upload file to FTP server via proxy with LWP::UserAgent
by moritz (Cardinal) on Nov 04, 2009 at 13:49 UTC | |
by linneighborhood (Initiate) on Nov 04, 2009 at 21:29 UTC | |
by Anonymous Monk on Nov 06, 2009 at 08:21 UTC | |
by Anonymous Monk on Nov 06, 2009 at 08:22 UTC |