Login   Register  
PHP Classes
elePHPant
Icontem

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Larry Wakeman  >  PHP Compare Directories  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP Compare Directories
Compare files in two directories and find changes
Author: By
Last change:
Date: 2013-11-07 16:38
Size: 947 bytes
 

Contents

Class file image Download
This class has been very useful for me in two instances, the first is
to determine filed that have been modified by comparing a sites files
to distribution files and the second is to locate infections on a site
by comparing the site files to a saved copy of a site. I save copies
of all sites i work on.

To use:
	initialize the class:
	    include ('compare.class.php');		// Load the class
	    $cmp = new compare();				// Initialize the class
	set up the source and update(pristine) directories:    
	    $cmp->set_source($dir.'\Source');	// Directory where Source files are
	    $cmp->set_update($dir.'\Update');	// Directory where pristeen files are
	do the compare:
	    $cmp->do_compare();					// Do the compare
	and get the reults:
	    $removed = $cmp->get_removed();		// Get the results
	    $added = $cmp->get_added();			// ...
	    $changed = $cmp->get_changed();		// ...
	    
It is up to you to format the results.