Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Alchemisten« (16. März 2015, 18:28)
Benutzerinformationen überspringen
Administrator
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »fluxX« (16. März 2015, 21:40)
PHP-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DDR Server Viewer</title>
<link rel="stylesheet" href="css/foundation.css" />
</head>
<body>
<?php
require('class_socket.php');
require('class_gameserver_query.php');
$ip1 = "...";
$port1 = "...";
$gameserver1 = new server_query($ip1, $port1);
$data1 = $gameserver1->source();
$ip2 = "...";
$port2 = "...";
$gameserver2 = new server_query($ip2, $port2);
$data2 = $gameserver2->source();
echo '<pre>';
print_r($data1);
print_r($data2);
echo '</pre>';
if($data1[discription] == "")
{
$status1 = "<font color='red'>Offline</font>";
}
else
{
$status1 = "<font color='green'>Online</font>";
}
if($data2[discription] == "")
{
$status2 = "<font color='red'>Offline</font>";
}
else
{
$status2 = "<font color='green'>Online</font>";
}
echo "<table>
<thead>
<th>Status</th>
<th>Spiel</th>
<th>Name</th>
<th>Karte</th>
<th>IP:Port</th>
<th>Spieler</th>
<th>Verbinden</th>
</thead>
<tbody>
<tr>
<td>$status1</td>
<td>$data1[discription]</td>
<td>$data1[hostname]</td>
<td>$data1[mapname]</td>
<td>$ip1:$port1</td>
<td>$data1[numplayers]/$data1[maxplayers]</td>
<td><a href='steam://connect/$ip1:$port1/'>Verbinden!</a></td>
</tr>
<tr>
<td>$status2</td>
<td>$data2[discription]</td>
<td>$data2[hostname]</td>
<td>$data2[mapname]</td>
<td>$ip2:$port2</td>
<td>$data2[numplayers]/$data2[maxplayers]</td>
<td><a href='steam://connect/$ip2:$port2/'>Verbinden!</a></td>
</tr>
</tbody>
</table>";
?>
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
|