I'm sure it's a stupid question that has been asked before (probably a few 1000 times), but here it goes any way...

I have a script that downloads a file from an ftp site see bellow

============
use strict;

# --- Customize here ---

my $url = ftp://ftp.server.com/path/";;
my $file = "c:\\download\\MyFILE.EXE";
my $code = 0;
my $fname = "";
my $fend = "-x86.exe";
my $dlfile = "";
my $x = 1;

# --- End customization ---

use LWP::Simple;
use Time::localtime;

while (($code != 200) && ($x <= 999))
{
# --- Generate URL ---
$dlfile = $url.sprintf("%4d%02d%02d-%003d%s", localtime->year+1900, localtime->mon+1, localtime->mday,$x,$fend);


   # --- Download files ---
   $code = getstore($dlfile, $file);

   $x = $x + 1;
}

print "Exit Code: $code";
============

The script works fine as long as I'm not behind a proxy. As soon as I get the script behind the proxy where it will reside it ends with a 500 Exit code. Anyone can provide me any info on how to get the script working behind a proxy? BTW I'm using ActivePerl's 5.8.4.810 on a Windows box. If I need to install additional modules to enable proxy that's OK, just point me in the correct direction and maybe a snippet of code to see how to enable the proxy and talk to the server through it.

In case it makes any difference it is a Squid proxy which is being used to block which destinations the users can connect to.

TIA for any help!!!
--

+------------------------------------------
| José J. Cintrón - <[EMAIL PROTECTED]>
+------------------------------------------



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to