Created
August 16, 2009 10:16
-
-
Save koraktor/168595 to your computer and use it in GitHub Desktop.
Generating a HTML table for player data aquired using Steam Condenser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Be sure that the path is correct | |
require_once "/path/to/steam-condenser/lib/steam-condenser.php"; | |
// Add your server's IP address here ... | |
$ipAddress = new InetAddress("x.x.x.x"); | |
// ... and port number here | |
$portNumber = yyyyy; | |
$server = new GoldSrcServer($ipAddress, $portNumber); | |
$players = $server->getPlayers("passw0rd"); // Player pings are only available if the RCON password is provided | |
echo "<table>"; | |
echo "<tr><th>Name</th><th>Score</th><th>Ping</th></tr>"; | |
foreach($players as $player) { | |
echo "<tr>"; | |
echo "<td>{$player->getName()}</td>"; | |
echo "<td>{$player->getScore()}</td>"; | |
echo "<td>{$player->getPing()}</td>"; | |
echo "</tr>"; | |
} | |
echo "</table>"; | |
?> |
koraktor, could you add the ability to specify a secondary port for games that have a seperate port for rcon purposes such as Arma2. It does not use the steamquery port but the gameport wich is different then the steamqueryport, effectivly making it impossible to use the rcon for arma2 bases servers atm with this library...
Could you update this? I don't know how to code so it be a great help if you can update this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yea had a feeling that would be the reason, probably should have looked into that more before signing up, oh well :(
Thanks anyway.