当前位置: 首页>>代码示例>>PHP>>正文


PHP Statistics::checkServer方法代码示例

本文整理汇总了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++;
        }
开发者ID:robbederks,项目名称:SiriKeys,代码行数:31,代码来源:server-status.php

示例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) {
开发者ID:rabih96,项目名称:The-Three-Little-Pigs-Siri-Proxy,代码行数:31,代码来源:load.ajax.php


注:本文中的Statistics::checkServer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。