<?php
// replace the next line with your own connect scripts
include_once('config/connect.php');
// include the class
include('mysql_status.inc');
// create a new instance of the class
$ServerStatus = new MySQLServerStatus;
$current_status = $ServerStatus->GetServerStatus();
// use : GetServerStatus()
// returns an array of the MySQL Server Status values
// see the MySQL documentation to get a list of the parameters
// example
// $status=GetServerStatus()
// $uptime=$status['Uptime'];
// $bytes_rcvd=$status['Bytes_received'];
// combine them with the Formatbytes function:
// $value=Formatbytes($status['Bytes_received'];
// $value=$ServerStatus->Formatbytes($current_status['Bytes_received'],3);
// echo $value['value'] . " " . $value['format'];
$value=$ServerStatus->Formatbytes($current_status['Bytes_received'],3);
// use : Formatbytes(the value, number of decimal places)
// byte value = $value['value']
// Format:
// TB = Terabyte
// GB = Gigabyte
// MB = Megabyte
// KB = Kilobyte
// $value['format']
$value=$ServerStatus->TimeSpanFormat($current_status['Uptime']);
// use : TimeSpanFormat(number of seconds)
// days = $value['Days']
// hours = $value['Hours']
// minutes = $value['Minutes']
// seconds = $value['Seconds']
?>
|