Hi
I installed Libnet-1.13 and got a test program running NET::ftp.
It seems to log on to the remote server and change diretory OK but refuses to get files or list the directory.
Is there something I should do on the remote server? Is there something I should do in the Libnet-1.13/Configure script?
I just ran the program from the Telnet command line.
Here's the code I was using:
#!/usr/bin/perl
use Net::FTP;
$switch = '-g';
$user = 'myuserid';
$password = 'mypassword';
$server = 'www.domain.co.uk';
$filename = 'filename.txt';
$path = '/usr/local/www/myremotepath';
$localpath = '/pub/home/htdocs/mylocalpath';
$ftp = Net::FTP->new($server); # contact server
$ftp->login($user, $password);
print "Logged on\n";
$ftp->cwd($path);
print "Changed directory to $path\n";
print "About to list the directory\n";
$ftp->ls || die "Failed to list\n";
print "About to get file $path $filename and put it in $localpath\n";
$ftp->get($filename, $filename, $localpath) || die "Failed to get $path $filename\n";
print "About to quit\n";
$ftp->quit();
Any help would be great.
Thanks
I installed Libnet-1.13 and got a test program running NET::ftp.
It seems to log on to the remote server and change diretory OK but refuses to get files or list the directory.
Is there something I should do on the remote server? Is there something I should do in the Libnet-1.13/Configure script?
I just ran the program from the Telnet command line.
Here's the code I was using:
#!/usr/bin/perl
use Net::FTP;
$switch = '-g';
$user = 'myuserid';
$password = 'mypassword';
$server = 'www.domain.co.uk';
$filename = 'filename.txt';
$path = '/usr/local/www/myremotepath';
$localpath = '/pub/home/htdocs/mylocalpath';
$ftp = Net::FTP->new($server); # contact server
$ftp->login($user, $password);
print "Logged on\n";
$ftp->cwd($path);
print "Changed directory to $path\n";
print "About to list the directory\n";
$ftp->ls || die "Failed to list\n";
print "About to get file $path $filename and put it in $localpath\n";
$ftp->get($filename, $filename, $localpath) || die "Failed to get $path $filename\n";
print "About to quit\n";
$ftp->quit();
Any help would be great.
Thanks