in reply to ftp.pl to retrieve a file
Don't use ftp.pl. The first sentence in that file states:
This library is no longer being maintained, and is included for backward compatibility with Perl 4 programs which may require it.
Instead, check out Net::FTP or LWP.
Here is an example stolen from Net::FTP documentation:
use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0); $ftp->login("anonymous",'-anonymous@'); $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp->quit;
As for your next question...
I need to put this into the web, how do I integrate the file into website or what CGI should I write to execute(trigger) this program... you're going to need to be more specific in describing exactly what you want to do.
If all you want to do is show a file from an FTP site when a user clicks on a link, consider linking directly to the file on that FTP site. Browsers know how to do FTP.
<a href="ftp://some.host.name/pub/that.file">click here</a>
If the FTP site requires a username and password and you don't mind letting the whole world know what they are, use:
<a href="ftp://username:password@some.host.name/pub/that.file">click h +ere</a>
-- Eric Hammond
|
|---|