Kim Haskell
© 2007-2016 Kim Haskell, .com, .fr
GNU GPL 2.0 Free Open Source Software
It is a software for transferring files to a website that works automatically to update site content from files created locally on a personal computer.
It detects changes and migrates modified files.
Files that have been edited for several days can be transferred.
Webmasters who make a site locally and then transfer pages to the server.
Therefore, it is not suitable for those who work online directly on the site, in particular for those whose site is completely managed by CMS.
However, the software can work if CMS such as forums are used along with static content, but it only works on the static part.
We pass useful parameters to the program: ftp address, login, password, remote directory, source directory. The source directory is viewed recursively with its subdirectories, content is compared to deleted content, and modified files are uploaded to the site.
The main acceleration options are:
The number of days elapsed is indicated, and all files changed in the last days are transferred without comparison with remote content.
The program is used in the command line, in the Windows command line window or in the Unix console.
It is recommended that you create a batch file (.BAT on Windows) so that you do not enter parameters each time you use it.
You can add a desktop icon that launches the batch file and clicks each time the file is modified.
In a personal environment, you can place all parameters in a batch file.
In a collaborative environment, you do not need to enter a password in the file. The program will then ask for it every time it is used.
There are two modes for working with other options:
Transfer depending on the period.
In this case, all files changed on the same day or from a certain number of days are transferred to the server. The backup directory becomes optional.
You can also compare files with those on the server without using a backup, but the operation is extremely slow.
The command has the form:
solp ftpsync [options] [options] dirsource [url]
or directly in PHP:
php ftpsync.php [options] [settings] dirsource url
Settings allow you to specify a login, password, etc. If there are no settings, the program asks for them.
The options determine the update mode and what you want to show. When no options are available, the default settings are used.
The URL is the ftp address in the form "ftp. Scriptol. fr" If it is not present, the program requests it.
Parameters and settings
-t Test mode, the program runs virtually and shows what it will do. But nothing changes either on the server or in the backup directory. By default, the mode is valid.
-ndays Period mode. The -n code is followed by the number of days: 0 for the same day, 1 for yesterday, and so on. Everything that changes over a given period, today, yesterday or in the last n days, passes through the server.
-backup Sets the backup directory and indicates that the backup mode is selected. The date of the files is compared with the date of the files in this directory, later files are downloaded. The date means the exact moment in the near future.
If this option is omitted, the program will compare files with those on the server. The transfer is very slow and may be interrupted by the server.
-ddirectory Sets the directory on the server to which the files are copied. Often the website is in the directory at:
-dwww/
On multicast hosting, you must specify the name of the directory associated with the domain. The directory is the same as the one used with the ftp transfer program.
This directory is not part of the browser URL.
-login Specifies the user ID. If specified but nothing follows, the program stops. Until the option is specified, the program will ask for a login.
-pmotdepasse Specifies the password. Works like a login. If you are working in a collective environment, do not put the password in the command file. It is better to enter when the program asks.
-c Compares content, not dates. This is done with the backup directory and is of course slower than the date comparison, which is the default option.
-a Transfers all files for site recovery, no comparison. If a backup directory is specified, there will also be a copy in that directory.
-v Verbose mode. Displays additional information about operations.
-q Silent mode. Program operations are not displayed.
Link Test Settings
For each page uploaded to the server, you can (starting from version 1.3) check the links contained in it to avoid link breaks, whether internal or external.
Two options were added to activate the test:
-u Activates the test.
-wsite Specify the site domain.
The site URL is required for relative internal links to recover a valid URL.
If the ftp address is also the site address, the -w parameter is superfluous, the ftp URL will be converted to http. This does not apply to single-hosting sites, so you must specify the site domain.
Site Map Option
The site map is updated automatically for all new web pages. If the page is already in the list, only the date will be updated. The change frequency and priority do not change.
-m Activates site map update.
In case of problems using PHP FTP Synchronizer, feel free to upload to the forum in your chosen language, iqlevsha.ru in French, scriptol.com in English.