Zend - The PHP Company




HTML

Add Code


system uptime script  

Type: code fragment
Added by: cellularmitosis
Entered: 26/02/2001
Last modified: 02/12/2000
Rating: - (fewer than 3 votes)
Views: 6558
here's a bit of code to display the system uptime of your linux server on your website.


<?php
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;

?>


Usage Example


See the example


Rate This Script





Search



This Category All Categories