PHP code example of tseweb / file-integrity-checker
1. Go to this page and download the library: Download tseweb/file-integrity-checker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tseweb / file-integrity-checker example snippets
$fic = new TSEWEB\FileIntegrityChecker\FileIntegrityChecker('/path/to/document/root', '/outside-document-root/file-integrity/');
$fic->exclude(array(
'./cache',
'./temp',
));
$changes = $fic->getChanges();
if ($changes!==false) {
// Mail changes to administrator
}