PHP code example of ottosmops / md5sum
1. Go to this page and download the library: Download ottosmops/md5sum 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/ */
ottosmops / md5sum example snippets
use Ottosmops\Md5sum\Md5sum;
$md5 = New Md5sum();
$md5->createMd5sums($dir);
if (!$md5->verifyMd5sums($dir . 'md5sums')) {
print_r($this->messages);
} else {
echo sprintf('All files in %s have correct checksums ', $md5->md5sums);
}
$md5 = New Md5sums();
$md5->createMd5sums($dir, "myfilename", false);