PHP Classes

PHP Secure File: Scan directories and compute hashes of file lists

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 55%Total: 309 All time: 7,316 This week: 182Up
Version Licenses PHP version Categories
secure-file 1.0BSD License, GNU ...5.0PHP 5, Files and Folders, Security
Description 

Author

This class can scan directories and compute hashes of file lists.

It can traverse a given directory recursively and compute SHA1 hashes of the each file it finds.

The listing of files and hashes is saved to a new file, so it can be used later to determine if any of the scanned files has changed.

Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 34
All time rank: 1108160 in United States United States
Week rank: 91 Up11 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Example

<?php
/** SecureFile**
 *
 * @Auther Nick Daniels : http://twitter.com/ManicSec
 * @INFO ::: Currently not finished, You're free to continue.
 */
require_once('SecureFile.class.php');

$secFile = new SecureFile("www/");
print_r($secFile->getDirStruct());


  Files folder image Files  
File Role Description
Files folder imagewww (2 files, 1 directory)
Accessible without login Plain text file example.php Example Example script
Plain text file SecureFile.class.php Class Class source
Accessible without login Plain text file sha1.db Data Auxiliary data

  Files folder image Files  /  www  
File Role Description
Files folder imageaSecondDIr (1 file)
  Accessible without login Plain text file about.php Data Example script
  Accessible without login Plain text file index.php Data Example script

  Files folder image Files  /  www  /  aSecondDIr  
File Role Description
  Accessible without login Plain text file index.php Data Example script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:309
This week:0
All time:7,316
This week:182Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:55%StarStarStar
Rank:1884