PHP Check Folder for New Files: Watch folder and send email when new files appear

Recommend this page to a friend!
  Info   View files Example   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-02-02 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 97 All time: 9,417 This week: 107Up
Version License PHP version Categories
dirtracker 1.0.0MIT/X Consortium ...5PHP 5, System information, Files and ...
Description Author

This package can be used to watch a folder and send email when new files appear.

It can take the path of a given directory and checks the time of the last change of all files in the directory to get the list of all files that were changed since the last time this checking procedure was performed.

The class sends an email message for each of the files that were added or changed in the directory.

It stores in a control file the time of when each check was performed, so next time the check is done again it can compare that time with the time of last change done on each of the files present in the directory.

Picture of Dawood Ikhlaq
  Performance   Level  
Name: Dawood Ikhlaq <contact>
Classes: 6 packages by
Country: Italy Italy
Age: 26
All time rank: 224188 in Italy Italy
Week rank: 80 Up3 in Italy Italy Up
Innovation award
Innovation award
Nominee: 3x

Details

DirTracker

Simple PHP Package To Track The Directory For New Files and If New File Has Been Detected It Sends Email To Admin

Installation

git clone https://github.com/daudmalik06/DirTracker
cd DirTracker
composer install
cp .env.example .env
set SMTP credentials in .env file and other variables

Usage

php track.php /path/to/dir

  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file last_timestamp Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file track.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file DirTrack.php Class Class source
  Accessible without login Plain text file helper.php Aux. Auxiliary script
  Accessible without login Plain text file last_timestamp Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:97
This week:0
All time:9,417
This week:107Up

For more information send a message to info at phpclasses dot org.