Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: How to upload file without using FTP?

by TedPride (Priest)
on May 24, 2006 at 17:18 UTC ( #551416=note: print w/ replies, xml ) Need Help??

in reply to How to upload file without using FTP?

Net::FTP (which comes with the standard Perl installation) will make this a whole lot simpler. Just install Perl on your comp, and use something like the following:

use strict; use warnings; use Net::FTP; my ($ftp, $host, $user, $pass, $dir, $fpath); $host = ""; $user = "myuser"; $pass = "mypass"; $dir = "/www/htdocs"; $fpath = "D:\work for people\k****ij\oil1.shtml"; $ftp = Net::FTP->new($host, Debug => 0); $ftp->login($user, $pass) || die "Bad login"; $ftp->cwd($dir) || die "Unable to change directories"; $ftp->put($fpath) || die "Unable to upload file"; $ftp->quit; print "Success!";
Then if you don't want to have to run even this manually, set up an automatic job to call perl every so often.

Comment on Re: How to upload file without using FTP?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://551416]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-12-01 01:26 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (791 votes), past polls