PHP Classes

File: checkMD5.php

Recommend this page to a friend!
  Classes of Unay Santisteban   PHP File Integrity Check   checkMD5.php   Download  
File: checkMD5.php
Role: Example script
Content type: text/plain
Description: Aux
Class: PHP File Integrity Check
Check if directory files change using MD5 hashes
Author: By
Last change: Update checkMD5.php
Date: 9 years ago
Size: 1,291 bytes


Class file image Download
<!DOCTYPE html>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
include 'libraries/integrity.md5.class.php';
$integrity = new integrity('path/to/check/directory');
$files = $integrity->checkMD5Hashes('hash.md5');
<h2>Modified Files</h2>
                    <th>User ID</th>
                    <th>Group ID</th>
                    <th>Last Access</th>
                    <th>Last Modified</th>
            <?php foreach($files as $file) { ?>
                    <td><?php echo $file['filename']; ?></td>
                    <td><?php echo $file['stat']; ?></td>
                    <td><?php echo $file['uid']; ?></td>
                    <td><?php echo $file['gid']; ?></td>
                    <td><?php echo $file['lastAccess']; ?></td>
                    <td><?php echo $file['lastModification']; ?></td>
            <?php } ?>