Wednesday, May 11, 2016

Change Detect and Alert PHP Script Detect Filesystem Changes On A Webserver

Purpose: detect filesystem changes on a (web)server and send list of changed or added files via email. Can send a kind of alert as SMS if your mobile network operator supports email to sms gateway. Tip: see Wikipedia for "List of SMS gateways".
Usage:
  • Change script settings (in file) according to your needs
  • Upload to your (web)server
  • Setup cron job to run it periodically;
    - via PHP "php -q /home/serverpath/script/change-detect-alert.php"
    - via cURL "curl http://www.example.com/path/to/change-detect-alert.php"
Notes: php script checks file size only, will possibly add date and contents comparison later if needed; invoking via PHP is preferred; you may need to specify absolute path to php or curl

Requirements: Change Detect and Alert is a script which is supposed to be run on a server with PHP and SQLite3 installed.

Download Change Detect and Alert PHP Script