JSON für Programme, Websites und mehr

text
https://api.gamemonitoring.de/servers/11143314
json
{
  "response": {
    "channels": {
      "onlinecount": 30,
      "items": [
        {
          "clients": 0,
          "id": 2,
          "items": [
            {
              "clients": 0,
              "id": 3,
              "items": [],
              "name": "Privat 1",
              "order": 0,
              "parent_id": 2,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 4,
              "items": [],
              "name": "Privat 2",
              "order": 3,
              "parent_id": 2,
              "topic": ""
            }
          ],
          "name": "[cspacer2]Privat",
          "order": 0,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 11,
          "items": [
            {
              "clients": 0,
              "id": 12,
              "items": [],
              "name": "BattleBit",
              "order": 0,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 2,
              "id": 13,
              "items": [],
              "name": "Battlefield",
              "order": 12,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 14,
              "items": [],
              "name": "Counter-Strike",
              "order": 13,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 15,
              "items": [],
              "name": "Call of Duty",
              "order": 14,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 16,
              "items": [],
              "name": "Grand Theft Auto",
              "order": 15,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 17,
              "items": [],
              "name": "Left 4 Dead",
              "order": 16,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 18,
              "items": [],
              "name": "Minecraft",
              "order": 17,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 27,
              "items": [],
              "name": "PUBG",
              "order": 18,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 28,
              "items": [],
              "name": "TrackMania",
              "order": 19,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 19,
              "items": [],
              "name": "Rocket League",
              "order": 27,
              "parent_id": 11,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 20,
              "items": [],
              "name": "Valorant",
              "order": 28,
              "parent_id": 11,
              "topic": ""
            }
          ],
          "name": "[cspacer1]Gaming-Hall",
          "order": 1,
          "parent_id": 0,
          "topic": "Gaming-Hall - Play with your friends! \\p Spiel mit deinen Freunden!"
        },
        {
          "clients": 0,
          "id": 5,
          "items": [
            {
              "clients": 0,
              "id": 6,
              "items": [],
              "name": "Goon 1",
              "order": 0,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 7,
              "items": [],
              "name": "Goon 2",
              "order": 6,
              "parent_id": 5,
              "topic": ""
            }
          ],
          "name": "[cspacer3]Savage Goon Squad",
          "order": 2,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 8,
          "items": [
            {
              "clients": 0,
              "id": 9,
              "items": [],
              "name": "Talk 1",
              "order": 0,
              "parent_id": 8,
              "topic": "Talk 1"
            },
            {
              "clients": 0,
              "id": 10,
              "items": [],
              "name": "Talk 2",
              "order": 9,
              "parent_id": 8,
              "topic": "Talk 2"
            }
          ],
          "name": "[cspacer0]Talk-Channels",
          "order": 5,
          "parent_id": 0,
          "topic": "Öffentliche Sprach-Räume \\p Public Talk-Channels"
        },
        {
          "clients": 2,
          "id": 1,
          "items": [],
          "name": "Eingang",
          "order": 8,
          "parent_id": 0,
          "topic": "Willkommen! - Welcome!"
        },
        {
          "clients": 0,
          "id": 21,
          "items": [
            {
              "clients": 0,
              "id": 22,
              "items": [],
              "name": "Wie gehts? How to?",
              "order": 0,
              "parent_id": 21,
              "topic": "Wie kann ich einen Kanal anlegen? How to create a channel?"
            }
          ],
          "name": "[cspacer5]Private User-Channels",
          "order": 11,
          "parent_id": 0,
          "topic": "Private User-Channels - Private Nutzer-Räume"
        },
        {
          "clients": 0,
          "id": 23,
          "items": [
            {
              "clients": 0,
              "id": 24,
              "items": [],
              "name": "A F K",
              "order": 0,
              "parent_id": 23,
              "topic": "A F K - Away from Keyboard"
            },
            {
              "clients": 0,
              "id": 25,
              "items": [],
              "name": "Bot 1",
              "order": 24,
              "parent_id": 23,
              "topic": "Bot 1"
            },
            {
              "clients": 0,
              "id": 26,
              "items": [],
              "name": "Bot 2",
              "order": 25,
              "parent_id": 23,
              "topic": "Bot 2"
            }
          ],
          "name": "[cspacer4]Sonstiges - Miscellaneous",
          "order": 21,
          "parent_id": 0,
          "topic": "Sonstige Kanäle, die nicht in eine andere Gruppe passen."
        },
        {
          "clients": 2,
          "id": 1731,
          "items": [],
          "name": "12313",
          "order": 23,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 2,
          "id": 1734,
          "items": [],
          "name": "666",
          "order": 1731,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "dQ926KWowU7mLoeklladXvaMxCQ=",
    "platform": "Linux",
    "created": 1749888639,
    "uptime": 5801816,
    "steam_id": null,
    "domain": "ts3.gamemania.org",
    "id": 11143314,
    "ip": "85.215.167.100",
    "port": 9987,
    "query": 10011,
    "color": 0,
    "city": "Berlin",
    "description": "Willkommen auf dem TeamSpeak 3 Server von GameMania.org!",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1772896295,
    "score": 0,
    "last_online": 1776898816,
    "icon": null,
    "name": "GameMania.ORG",
    "connect": "ts3.gamemania.org:9987",
    "request": "85.215.167.100:10011",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 8,
    "maxplayers": 32,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 70,
    "add_date": 1771676670,
    "last_update": 1776898816,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 58,
    "language": "de",
    "parked": false,
    "app": {
      "id": 1629110,
      "steam_id": 9000043,
      "name": "Teamspeak 3",
      "url": "teamspeak-3"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Codebeispiele

php
<?php
$json = file_get_contents("https://api.gamemonitoring.de/servers/11143314");
$data = json_decode($json, true);
var_dump($data);