You are not logged in.

Dear visitor, welcome to sourceserver.info. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, March 16th 2015, 2:24pm

Server Status website

Hallo liebe Souerceserver Community,

Ich wollte mal fragen ob mir jemand Helfen kann...
Ich brauche eine Server Status Seite wo alle Game/TeamSpeak/Website Server angezeigt werden und auch als Offline oder Online angezeigt werden also eigentlich eine abfrage an den Servern ob sie Online oder Offline sind aber das halt Live mut Auto-Refreah alle 30 Sekunden.

Wie z.B. hier;


Wäre echt super wenn mir jemand Helfen könnte...

#EDIT

Die Map soll angezeigt werden, die slots + aktuelle spieler anzahl, ....

Greetz
Rechtschreibfehler sind voll normal

This post has been edited 1 times, last edit by "Alchemisten" (Mar 16th 2015, 6:28pm)


Pitbull

Trainee

Posts: 125

Location: Oldenburg

wcf.user.option.userOption53: Ja

  • Send private message

DeaD_EyE

Administrator

Posts: 3,980

Location: Hagen

Occupation: Mechatroniker (didaktische Systeme)

wcf.user.option.userOption53: Nein

  • Send private message

3

Monday, March 16th 2015, 7:01pm

Im englischen Artikel wird ganz gut erklärt welche Struktur und Datentypen verwendet werden: https://developer.valvesoftware.com/wiki/Server_queries
Sofern du PHP kannst, sollte es nicht schwer seit mit Hilfe der Doku schnell etwas zu programmieren. In dem Artikel sind noch Implementierungen in den verschiedenen Sprachen aufgelistet. Für PHP ist auch was dabei.

Pitbull

Trainee

Posts: 125

Location: Oldenburg

wcf.user.option.userOption53: Ja

  • Send private message

4

Monday, March 16th 2015, 8:44pm

Damit habe ich auch gut Erfahrungen gemacht http://gameq.sourceforge.net/

This post has been edited 1 times, last edit by "fluxX" (Mar 16th 2015, 9:40pm)


Bara

Professional

Posts: 834

wcf.user.option.userOption53: Ja

  • Send private message

5

Monday, March 16th 2015, 8:48pm

Versuch es mal hier mit. Hab eig. nie mit php zutun, also erwartet nicht zuviel vom Code :-D .

Spoiler Spoiler

Das bräuchte man auch (kein muss) http://foundation.zurb.com/

PHP Source code

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>
Bara has attached the following file:
  • class.zip (5.58 kB - 114 times downloaded - latest: Today, 1:58pm)

HSFighter

Administrator

Posts: 1,517

Location: Flensburg

Occupation: Industrieelektroniker

wcf.user.option.userOption53: Nein

  • Send private message

6

Monday, March 16th 2015, 11:13pm

Ich habe vor einiger Zeit mal eine Klasse für Source erweitert und im Wiki veröffentlicht.

Mittlerweile nutze ich für meine Zwecke aber eine etwas flexiblere Klasse: https://github.com/xPaw/PHP-Source-Query-Class

Ist einfach zu handhaben und bringt alles mit ^^

P.s. Sogar eine Rcon Klasse ist dabei!

Gruß
HSFighter



-
Anti Cheat: www.smacbans.com
Kein direkter Support per PM (nur auf Anforderung)

7

Tuesday, March 17th 2015, 3:56pm

Ich bedanke mich bei euch allen für die tolle Hilfe.

#closed

Greetz
Rechtschreibfehler sind voll normal