PHP Ftp Backup Library
Published: 2007-10-23
UPDATE 2019-11-07: Tool used for work many years ago. At that time there weren't many good options to small companies for off-site backups. This tool allowed our critical files to be automatically sent off-site on a nightly basis. Things have come a long way since then!
Here is an example of how to use this library:
<?php
require_once('Iat/Ftp/Backup.php');
$ftpBu = new Iat_Ftp_Backup();
$ftpBu->logFileFullName =
'c:\\documents and settings\\user\\desktop\\phpftpbackup\\'.
date('Ymd').'.txt';
$ftpBu->ftpServer = 'ftp.serveraddress.com';
$ftpBu->ftpPort = 21;
$ftpBu->ftpUserName = 'username';
$ftpBu->ftpUserPass = 'password';
$ftpBu->ftpUsePasv = true;
$ftpBu->ftpUseSSL = true;
$ftpBu->logEnabled = true;
$ftpBu->logToScreen = true;
$ftpBu->dataPreviewOnly = true;
$ftpBu->remoteDirFullName = '/dbs/';
$ftpBu->localDirFullName = '\\\\server\\backups\\';
$ftpBu->runBackup();
?>