#1
  1. No Profile Picture
    dark_jurmanji
    Guest
    Devshed Newbie (0 - 499 posts)
    Does anyone know how to FTP from within a CGI script?

    I can't find anything about ftp in any of my Perl books.

    I am trying to use Mysql > select > print into file and then ftp it to a mainframe.
    Useing command line ftp it works just fine.

    Should I try and use `command` or is there a module out there that can do it for me?
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Ft. Lauderdale, FL, US
    Posts
    29
    Rep Power
    0
    there is a Net::FTP module on CPAN...

    try looking there.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    #!/usr/bin/perl

    use Net::FTP;

    $ftp = Net::FTP->new("ftp.domain.com", Debug => 0);
    $ftp->login('username','password');
    $ftp->binary;
    #or
    $ftp->ascii;
    $ftp->cwd("directory");
    $ftp->put("/path/to/file.txt");
    $ftp->quit;

    You'll find most or all ftp commands worth perfectly through this module.
  6. #4
  7. No Profile Picture
    dark_jurmanji
    Guest
    Devshed Newbie (0 - 499 posts)
    Where can I get this module?

    Is it free?
    Is there a site that I can download it from?
  8. #5
  9. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    luciddream already told you but not specific enough. You need to get the libnet package from http://www.perl.com/CPAN-local/modul...-1.0703.tar.gz

IMN logo majestic logo threadwatch logo seochat tools logo