PHP Classes

PHP Server Status Script: Check a status file to determine if a site is down

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-03 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 117 All time: 9,488 This week: 134Up
Version License PHP version Categories
server-downtime 1.0.0Custom (specified...5PHP 5, System information


This package can check a status file to determine if a site is down.

It provides a script that can be executed from a cron task to check the time an application recorded it is up and running.

If it passes a given time after the last uptime moment, the script will record a downtime moment in another file.

Innovation Award
PHP Programming Innovation award nominee
June 2023
Number 6
Every Web project needs to be monitored to confirm it responds well when the users access the site.

One way to monitor a site is to try to access one page and check if it is responding quickly.

This package provides a script that responds to accesses from a separate server.

The script can check an internal file that records the last time the site application responded well.

If it passed more than a given time, the script can record a down time moment and output a response that displays the current down time.

This way, a developer can implement a simple server status script cheaply.

Manuel Lemos
Picture of Aleksandar Vranesevic
Name: Aleksandar Vranesevic is available for providing paid consulting. Contact Aleksandar Vranesevic .
Classes: 1 package by
Country: Serbia Serbia
Age: ???
All time rank: 435213 in Serbia Serbia
Week rank: 387 Up3 in Serbia Serbia Up
Innovation award
Innovation award
Nominee: 1x


How to install

Add cron job:

curl https://(your_website_address)/cronjob/server_uptime.php >/dev/null 2>&1  

Set cron job to be once per minute.

Make sure used directory is writable.

Downtime log will be in used/downtime_log.dat file, open file with any text editor to see logged data.

  Files folder image Files  
File Role Description
Files folder imagecronjob (2 files)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  cronjob  
File Role Description
  Accessible without login Plain text file configuration.php Conf. Configuration script
  Accessible without login Plain text file server_uptime.php Appl. Application script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,488
This week:134Up