本文整理汇总了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> <a href ="ping.html">Ping a Server</a>
<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>';
}