當前位置: 首頁>>代碼示例>>PHP>>正文


PHP query::query_srv方法代碼示例

本文整理匯總了PHP中query::query_srv方法的典型用法代碼示例。如果您正苦於以下問題:PHP query::query_srv方法的具體用法?PHP query::query_srv怎麽用?PHP query::query_srv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在query的用法示例。


在下文中一共展示了query::query_srv方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: define

                <a href ="index.php">Scan Lan</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href ="ping.html">Ping a Server</a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href ="rcon.php">Control a Server</a>
            </div>
            <div class="content">
	<?php 
define('PHGDIR', './');
$phgdir = PHGDIR;
$flag = 0;
include_once PHGDIR . 'listen.class.php';
include_once PHGDIR . 'query.class.php';
include_once PHGDIR . 'hostel.class.php';
include_once PHGDIR . 'includes/daytime.inc.php';
// time function
include_once PHGDIR . 'includes/dns.inc.php';
// dns function
$server = query::query_srv('hl');
function srv_info($sh_srv, $srv_rules, $use_file, $use_bind, $only, $phgtable)
{
    // html: table to show server infos
    echo '<center><table border="0" cellpadding="2" cellspacing="2" width="' . $phgtable . '">' . "\n";
    // html: hostname, hostel and daytime
    echo '<tr>' . '<th colspan="2">' . 'Server Name :' . $srv_rules['hostname'] . '<br/>' . 'Server Hostel :' . $srv_rules['hostel'] . ' Hostel' . '</th>' . '</tr>' . "\n";
    // html: adress, game, gametype, mapname, players, privileges
    echo '<tr><td>' . "\n" . '<table border="0" cellpadding="3" cellspacing="0">' . "\n" . '<tr valign="top"><td align="left">IP:</td><td align="left">' . $srv_rules['adress'] . '</td></tr>' . "\n" . $srv_rules['htmldetail'] . '</table></td>' . "\n";
    // html: map picture
    echo '<td width="60%" align="center">' . "\n" . '<img alt="' . $srv_rules['mapname'] . '" src="' . $srv_rules['map'] . '" border="0">' . "\n" . '</td>' . "\n" . '</tr>' . "\n";
    // html: close info table
    echo '</table>' . "\n";
    echo '<a href="ping.php?ip=' . substr($srv_rules['adress'], 0, strlen($srv_rules['adress']) - 6) . '">Get Details</a>';
    echo '</center>';
}
開發者ID:Tachyon,項目名稱:Counter-Strike-Server-FInder,代碼行數:31,代碼來源:scan.php


注:本文中的query::query_srv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。