Guten Abend.
Ich habe seit gut einen Tag diesen Error und weis nicht warum.
Der Code dürfte keine Fehler enthalten aber er ich bekomme trotzdem welche.
Der Code von dieser Seite entnommen:
forum.sa-mp.com/showthread.php?t=99649
Code:
Spoiler anzeigen
Alles anzeigen
Bitte um Hilfe!
mfg.
Opa
Ich habe seit gut einen Tag diesen Error und weis nicht warum.
Der Code dürfte keine Fehler enthalten aber er ich bekomme trotzdem welche.
Der Code von dieser Seite entnommen:
forum.sa-mp.com/showthread.php?t=99649
Code:
PHP-Quellcode
- <?php
- require "samp_query.php";
- $serverIP = "91.121.209.20";
- $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)){
- ?>
- <b>General Information</b>
- <table width="400">
- <tr>
- <td>Hostname</td>
- <td><?php echo htmlentities($aInformation["Hostname"]); ?></td>
- </tr>
- <tr>
- <td>Gamemode</td>
- <td><?php echo htmlentities($aInformation["Gamemode"]); ?></td>
- </tr>
- <tr>
- <td>Players</td>
- <td><?php echo $aInformation["Players"]; ?> / <?php echo $aInformation["MaxPlayers"]; ?></td>
- </tr>
- <tr>
- <td>Map</td>
- <td><?php echo htmlentities($aInformation["Map"]); ?></td>
- </tr>
- <tr>
- <td>Weather</td>
- <td><?php echo $aServerRules["weather"]; ?></td>
- </tr>
- <tr>
- <td>Time</td>
- <td><?php echo $aServerRules["worldtime"]; ?></td>
- </tr>
- <tr>
- <td>Version</td>
- <td><?php echo $aServerRules["version"]; ?></td>
- </tr>
- <tr>
- <td>Password</td>
- <td><?php echo $aInformation["Password&"] ? "Yes" : "No" ?></td>
- </tr>
- </table>
- <br />
- <b>Online Players</b>
- <?php
- if(!is_array($aTotalPlayers) || count($aTotalPlayers) == 0){
- echo "<br /><i>None</i>";
- } else {
- ?>
- <table width="400">
- <tr>
- <td><b>Player ID</b></td>
- <td><b>Nickname</b></td>
- <td><b>Score</b></td>
- <td><b>Ping</b></td>
- </tr>
- <?php
- foreach($aTotalPlayers AS $id => $value){
- ?>
- <tr>
- <td><?php echo $value["PlayerID"]; ?></td>
- <td><?php echo htmlentities($value["Nickname"]); ?></td>
- <td><?php echo $value["Score"]; ?></td>
- <td><?php echo $value["Ping"]; ?></td>
- </tr>
- <?php
- }
- echo "</table>";
- }
- }
- ?>
Bitte um Hilfe!
mfg.
Opa