That's really wierd.. I simply added a function, so it should display it...
Code:
function getserveruptime() {
$fd = fopen( '/proc/uptime' , 'r' );
$ar_buf = split( ' ' , fgets( $fd , 4096 ) );
fclose( $fd );
$sys_ticks = trim( $ar_buf[0] );
$min = $sys_ticks / 60;
$hours = $min / 60;
$days = floor( $hours / 24 );
$hours = floor( $hours - ( $days * 24 ) );
$min = floor( $min - ( $days * 60 * 24 ) - ( $hours * 60 ) );
if ( $days != 1 ) {
$value = $days . ' days, ';
} else {
$value = $days . ' day, ';
}
if ( $hours != 1 ) {
$value .= $hours . ' hours and ';
} else {
$value .= $hours . ' hour and ';
}
if ( $min != 1 ) {
$value .= $min . ' minutes';
} else {
$value .= $min . ' minute';
}
return $value;
}
$serveruptime = getserveruptime();
The rest is unchanged.
Boofo, simply call $serveruptime anywhere you want... you could use this:
'][high]<br />[/high][Server UpTime: ' . $serveruptime . ']';
from the line listed above, it will display it under the actual line of admin stats... let me know if everything is ok... simply add the above function below this line:
Code:
preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/',$stats,$regs);