Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=utf-8">
- <link rel="stylesheet" type="text/css" href="verticleb.css">
- <title>Put site name here.</title>
- </head>
- <?php
- require "samp_query.php";
- $serverIP = "178.63.52.144";
- $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 'Server is offline';
- }
- if(isset($aInformation) && is_array($aInformation)){
- ?>
- <body>
- <div id="boxwrap">
- <div id="header">
- <?php echo htmlentities($aInformation['Hostname']); ?>
- </div>
- <div id="content">
- Server IP: <?php echo $serverIP ?>:<?php echo $serverPort ?> <br>
- Players: <?php echo $aInformation['Players']; ?> / <?php echo $aInformation['MaxPlayers']; ?> <br>
- Server Status: Server Stats...<br>
- Gamemode: <?php echo htmlentities($aInformation['Gamemode']); ?><br>
- <hr>
- <u>Online Players:</u><br>
- <table width="200" border="0" align="left">
- <tr>
- <td><span class="scrollArea">
- <b>
- <?php
- foreach($aTotalPlayers AS $id => $value){
- ?>
- <?php echo nl2br($value['Nickname']); ?>
- <br />
- <?php
- }
- echo '</table></span>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement