Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "samp_query.php";
- $serverIP = "91.211.246.172";
- $serverPort = 7777;
- try
- {
- $rQuery = new QueryServer( $serverIP, $serverPort );
- $aInformation = $rQuery->GetInfo( );
- $aServerRules = $rQuery->GetRules( );
- $aBasicPlayer = $rQuery->GetPlayers( );
- $aTotalPlayers = $rQuery->GetDetailedPlayers( );
- $rQuery->Close( );
- }
- catch (QueryServerException $pError)
- {
- echo 'Serveris išjungtas';
- }
- if(isset($aInformation) && is_array($aInformation))
- {
- ?>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <title>Monitorius</title>
- <div class="background">
- <div class="tekstas">
- <tr>
- <td><font color="white">Serveris:</font></td>
- <td><font color="orange"><?php echo htmlentities($aInformation['Hostname']); ?></font></td><br>
- </tr>
- <tr>
- <td><font color="white">Prisijunge zaidejai:</font></td>
- <td><font color="orange"><?php echo $aInformation['Players']; ?> / <?php echo $aInformation['MaxPlayers']; ?></font></td><br>
- </tr>
- <tr>
- <td><font color="white">Versija:</font></td>
- <td><font color="orange"><?php echo htmlentities($aInformation['Gamemode']); ?></font></td><br>
- </tr>
- <tr>
- <td><font color="white">Zemelapis:</font></td>
- <td><font color="orange"><?php echo htmlentities($aInformation['Map']); ?></font></td><br>
- </tr>
- <tr>
- <td><font color="white">Serverio IP:</font></td>
- <td><font color="orange"><?php echo $serverIP; ?>:<?php echo $serverPort; ?></font></td><br>
- </tr>
- <tr>
- <td><font color="white">Klientas:</font></td>
- <td><font color="orange"><?php echo $aServerRules['version']; ?></font></td><br>
- </tr>
- </div>
- </div>
- <?php
- }
- echo '</table>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment