PHP Classes
elePHPant
Icontem

PHP Web Site Compare Files: Compare the list of files of two Web sites

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-07-26 (3 years ago) RSS 2.0 feedStarStarStarStar 77%Total: 231 This week: 1All time: 7,916 This week: 313Up
Version License PHP version Categories
compare-site-files 1.0.0GNU General Publi...5PHP 5, Files and Folders, Web services
Collaborate with this project Author
Description

This class can compare the list of files of two Web sites.

It can take the URLs of two sites and compares the list of files between them.

The class uses file_list.php script that needs to be installed on both site servers, so it can use that script to retrieve the files list.

The class displays a report of the files that are missing or changed between servers, as well the respective modification dates and sizes.

Innovation Award
PHP Programming Innovation award winner
August 2016
Winner


Prize: One downloadable copy of CodeLobster Professional
Sometimes it is necessary to verify if the files of a site on the server are up to date and were not changed eventually by an attacker that took advantage of a security hole.

There are some solutions that compute hashes of all the files in the server but they do not tell whether the files different because they are not up to date with the latest development version or were changed eventually due to a security attack.

This class provides a solution that uses a different approach. It calls a script on the server that lists the existing files.

This way it can compare list of files on the production and the development environments, or even compare the files installed on different production or testing servers.

Manuel Lemos
  Performance   Level  
Name: Roger George <contact>
Classes: 1 package by
Country: United States United States
Age: 41
All time rank: 3907449 in United States United States
Week rank: 295 Up26 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

 

Details

PHP_Compare_Website_Files

Compare similar website files. Shows missing files, different files (modified date / size), and files modified in the last 7 days.

http://bwat.info/

Last Updated = 7/25/16 Created By: Blastroid

Instructions:

Copy the file_list.php file to the root directory of 2 websites you want to compare.

Use the following code:

$compare = new compareFolders('http://URL1/file_list.php', 'http://URL2/file_list.php');

Where it says URL1 change to the website #1 URL

Where it says URL2 change to the website #1 URL

Optional paremeters are naming the 2 website paths (Defaults are URL1, and URL2). Example:

$compare = new compareFolders('http://URL1/file_list.php', 'http://URL2/file_list.php', 'Website 1', 'Website 2');


Run the class where you want the 3 HTML tables to be written.

Note: In the compare_file.php you can add to the array $ignoreFiles to ignore files.

See http://bwat.info/ for more information.

  Compare_Website_FilesExternal page  

Open in a separate window

Screenshots  
  • screenshot.png
  Files folder image Files  
File Role Description
Plain text file compare_files.php Class Class source
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file file_list.php Aux. Auxiliary script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 83%
Total:231
This week:1
All time:7,916
This week:313Up
User Ratings User Comments (1)
 All time
Utility:100%StarStarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:93%StarStarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:77%StarStarStarStar
Rank:73