PhpSnip.com

User Stats

system uptime script

here's a bit of code to display the system uptime of your linux server on your website.

Info

 Download  View Source (print view)
 Rating : 4.7  Views : 474

Source Code ( 10 lines )

echo "system uptime: ";
$uptime = exec("uptime");
$a = strstr($uptime,"up");
$a = substr($a,2);
$a = strrev($a);
$a = strstr($a,"sresu");
$a = strstr($a,",");
$a = substr($a,1);
$a = strrev($a);
echo $a;

Search

Subscribe

  Rss Feeds

Sponsors

Advertise