PHP FTP Synchronizer - Free Program For Website Update
Free program to update your website from local files. PHP FTP Synchronizer traverses the tree structure of the source directory recursively and updates the file on the website, by replacing the files which were modified.
PHP FTP Synchronizer is a script whose source code is in Scriptol language
and converted into PHP by the Scriptol PHP compiler available on this site,
in version 7.0.
It work at command line (a graphic interface is under development for Windows).
Why use PHP FTP Synchronizer?
Compared to the various existing programs, commercial for the majority, the synchronizer offers speed options:
- Possible use of a backup version on which the comparisons are performed, what avoids downloading the remote file and allows an extremely fast update thus. Moreover that builds a second backup of the site, possibly on a removable storage unit.
- Possibility of uploading all files modified in n last days, n being a number of days that you define.
Moreover the executable program is a PHP script, it thus works on all operating systems, Windows, Linux, Mac... And you can extend its possibilities if needed.
How the program works
The required parameters being given (see below), the program has the location
of your files, the name of the site (in ftp.xxxx.tld form), login and password,
directory on hosting if one does not copy at root, as well as chosen options.
It reads each file by scanning in a recursive way the source directory and the sub-directories, compares files with remote files if there exists, and copies them or replaces them.
If the option of acceleration is selected, it compares the dates or contents of file with the backup, and if they are different uploads the files, copies them on the backup also and synchronizes the date of files in the backup with that of sources.
How to use the synchronizer
One opens a DOS Windows or a console under Linux or Mac.
One type a command in the form:
solp ftpsync [options]
or directly in PHP:
php ftpsync.php [options]
Texts in brackets  are optional.
php ftpsync.php -v -llogin -pmotdepass -fftp.scriptol.com -dw:\scriptol\ -bf:\scriptol\ -wwww.scriptol.com
The options which are detailed in the handbook allow to pass all the required parameters. If a parameter misses, the program prompt you for it. But if an option is given and that must be followed by a string, this one must be provided in order, it is not asked by the program which in this case displays an error.
Manual of use
Manual of PHP FTP Synchronizer
in HTML version.
More formats are available, see at bottom.
Last changes in versions
- 1.9. February 13, 2012. Link checker now does not display 302 temporary redirects.
- 1.8 - September 20, 2010. Link checker now handles links relative to the root.
- 1.5 - August 6, 2008. The link check is differed, and performed once all pages are updated.
- 1.4 - July 1, 2008. Results of link check more precise. Only the pages with broken links or redirects are now displayed.
- 1.3 - June 24, 2008. The -u options activates a link check inside last added or modified pages.
- 1.2 - December 13, 2007. Added the -f option for url without ftp prefix.
- 1.1 - September 24, 2007. Added the passive FTP mode.
- 1.0 - September 18, 2007. First release.
- Without backup, after some times the program could accelerates and wants
to upload all the files without distinction.
That comes from a lack of memory for the PHP interpreter to make the comparisons and to select the modified files.
One can increase the allocated memory in the php.ini file which is in the Windows directory or equivalent under Unix just as the execution time granted to scripts:
max_execution_time = 3000 memory_limit = 256M
It is possible also that the server closes the connection if it works for a long time. Use a backup directory or the -n option preferably.
- If you have installed Windows Live Oncare, ftp transferts are limited, verify first the results of updates made by the program before to use it in production.
Getting the program
The archive contains:
- The Scriptol source.
- The PHP executable script,
- The manual in HTML format, and ODF, you can create a PDF or Word's DOC file with Open Office.
- The ftpcheck script to verify a connection.
- The GPL licence.
By Kim Haskell & Denis Sureau . GNU GPL 2 License.
Link Checker on the server side