This is not tested, since I don't know the name of the $filename to be able to test it, so if you see an error, please let me know.
I need to be able to find the name of the latest file, so I have a value to put in $filename.
$dir="path/to/remote/directory/"
$mypath="path/to/local/directory/"
require("/home/mydir/public_html/class_files/class.FTP.php");
$f=new PHP_FTP('prftp01.remoteserver.com/outgoing', 'yyyyy', 'xxxxx',21); //where yyyyy is the user name and xxxxx is the password
$f->get($dir.$filename, $mypath.$filename);
$f->kill();
|