rsync in php
rsync in php :
rsync allows to transfer just the differences between two sets of files across the network connection, using an efficient checksum-search algorithm. It copies files either to or from a remote host, or locally. There are two different ways for rsync to contact a remote system: using a remote-shell program as the transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. We can run rsync using exec function in PHP.
Syntax:
exec(”rsync [option] [src] [Destination]”);
Example:
<?php
/****** To copy files from folder2 to folder1 ***********/
exec(”rsync -a user@server:folder2/ folder1″);
?>
