Location: PHPKode > scripts > FTP Sync > ftp-sync/sync.php
<?php
include "FTPSync.class.php";
set_time_limit(0);

$sync = new FTPSync("ftp.example.com", "user", "password");
$sync->setPassive(true);
echo $sync->pwd()."<br />";	//get present workin directory
$sync->setFilter(".svn");	//Don`t upload .svn directory and all of its childrens to remote host
$sync->setFilter("sample.txt");
$sync->saveLog("ftp.log");
$sync->sync("/var/www/site", "www/site", 300);
?>
Return current item: FTP Sync