* Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: server-status.php * Last update: 22-02-2012 ******************************************************************/ $websiteProperty = new WebsiteProperty(); $statistics = new Statistics(); $keys = getkeys(); $config = getconfig(); $stats = getstats(); $server_running = $statistics->checkServer($websiteProperty->getProperty("hostname_or_ip") . ':443'); //error_reporting(0); ?> <h1>Server Status and Statistics</h1> <p>Hover with your mouse over the table headers to get a detailed explantion of what it is.</p> <div style="overflow: hidden"> <div style="width:300px; float:left; margin-right: 25px;"> <?php $keyFactor = 0; if (count($keys[0]) > 0) { foreach ($keys[0] as $key) { if ($key['keyload'] < $config['max_keyload']) { $keyFactor++; }
* Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: load.ajax.php * Last update: 16-02-2012 ******************************************************************/ require_once "config.inc.php"; require_once "connection.inc.php"; require_once "functions.inc.php"; require_once "Statistics.class.php"; $config = getconfig(); $stats = getstats(); $keys = getkeys(); $statistics = new Statistics(); $serverStatus = $statistics->checkServer("173.0.57.230:443"); $keyFactor = 0; if (count($keys[0]) > 0) { foreach ($keys[0] as $key) { if ($key['keyload'] < $config['max_keyload']) { $keyFactor++; } } } switch ($_GET['get']) { default: echo 'No get variable set (api.php?get=x).<br /><br />Possible options:<br /><ul><li>server-running</li><li>server-uptime</li><li>dropdown-time</li><li>happy-hour</li></ul>'; echo '<h1>' . $stats['happy_hour_elapsed'] . '</h1>'; break; case "server-status": if ($serverStatus) {