|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
there is a Net::FTP module on CPAN...
try looking there. |
|
#3
|
|||
|
|||
|
#!/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. |
|
#4
|
|||
|
|||
|
Where can I get this module?
Is it free? Is there a site that I can download it from? URL |
|
#5
|
|||
|
|||
|
luciddream already told you but not specific enough. You need to get the libnet package from http://www.perl.com/CPAN-local/modules/by-module/Net/libnet-1.0703.tar.gz
|
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > FTP from a CGI script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|