Hi folks nice easy one for once!
Code:
<?php
require_once "PHPFTP.php";
$ftp = new PHPFTP();
// if the first argument to Connect is blank,
// PHPFTP will connect to the local host via 127.0.0.1
$result = $ftp->Connect('tux.isa-geek.org','ftp','johnh@my.net');
if ($result == 0) {
$ftp->DoCommand('cd private', $result_number, $result_text);
$ftp->DoCommand('cd webcam', $result_number, $result_text);
$ftp->DoCommand('get lastsnap.jpg', $result_number, $result_text);
// say Disconnect(0); to break the connection without explicitly logging out
$ftp->Disconnect();
}
?>
two things i need one, is how do i ask this to use port 21. where it lives, default port is 91.
second, the file may exist, will it automaticly go over it? if not how do i ask php to del it first?. still learning php!