Display Server Uptime Using PHP Script

June 30, 2009 by Mark  
Filed under Tips & Tricks

Start you favorite text editor and type the following text.

<?php system("uptime"); ?>

Now save the file as uptime.php and then upload the file to your server root directory. Once uploaded, open your internet browser and point it to the uptime.php by typing http://yourdomain.com/uptime.php. Change yourdomain.com with your own domain name. This script call the unix system command ‘uptime’ and display the result in html format so that it can be display on your internet browser. Below is the example result display by the script.

Read more