本文整理汇总了PHP中Statistics::checkServer方法的典型用法代码示例。如果您正苦于以下问题:PHP Statistics::checkServer方法的具体用法?PHP Statistics::checkServer怎么用?PHP Statistics::checkServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistics
的用法示例。
在下文中一共展示了Statistics::checkServer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WebsiteProperty
* 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++;
}
示例2: getconfig
* 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) {