I've been trying to set up madcoder's madQuery plugin for checking up on Counter-Strike servers from a webpage, and the plugin itself works fine. However, I would like to get a reduced version of it set up to display many of them on a single page. And the reduced version doesn't work. It just doesn't display anything whatsoever.
Here's the reduced code: (commented items are just irrelevant)
<?
$serverip = "xxx"; // Your server's IP address
$serverport = 27016; // Your server's port
//$mapsdl = "about:blank";
// Link to download maps
//$relimgpath = ""; // Relative path to map-images
// Set to "" to disable images
//$mapimgext = "jpg"; // Map image extension
// Ignored if img path is ""
require_once("madquery.php"); // REQUIRED, do not change
//$qrystr=""; //Used to build links
//qrystr="mop=loadmod&name=Query&file=index&func=query"; //An example for PHPnuke users
echo "<html><head><meta http-equiv="pragma" content="no-cache"><title>Server Query</title></head><body>\n";
$server=new madquery($serverip, $serverport);
if($server->isup()<=0) {
echo "The server timed out...";
} else {
$server->getdetails();
$server->getplayers();
?>
<div align="center" class="style1">
<table border="0" cellspacing="0">
<tr><td align=right>Server: </td><td><b><?=$server->mhostname()?></b></td></tr>
<tr><td align=right>IP: </td><td><b><?=$server->mAddress() ?></b></td></tr>
<tr><td align=right>Players: </td><td><b><?=$server->mActive()?> / <?=$server->mMax()?></b></td></tr>
<tr><td align=right>Map: </td><td><b><?=$server->mMap()?></b></td></tr>
</table>
<?
} /* if isup */
?>
</table>
</div>
</body>
</html>