JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/10454543
json
{
  "response": {
    "channels": {
      "onlinecount": 30,
      "items": [
        {
          "clients": 1,
          "id": 1,
          "items": [],
          "name": "[cspacer2] Herzlich Willkommen bei BOS",
          "order": 0,
          "parent_id": 0,
          "topic": "Default Channel has no topic"
        },
        {
          "clients": 0,
          "id": 684,
          "items": [],
          "name": "[*cspacer11]--",
          "order": 1,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 507,
          "items": [],
          "name": "[cspacer14]\"SLOEx\"",
          "order": 457,
          "parent_id": 0,
          "topic": "SLOEx WOT Clan Slovenia"
        },
        {
          "clients": 0,
          "id": 508,
          "items": [
            {
              "clients": 0,
              "id": 554,
              "items": [],
              "name": "AFK - Ne moti",
              "order": 0,
              "parent_id": 508,
              "topic": "AFK Kanal, Ne moti, Ne piši ipd..."
            },
            {
              "clients": 0,
              "id": 514,
              "items": [],
              "name": "Platoon 1",
              "order": 513,
              "parent_id": 508,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 527,
              "items": [],
              "name": "Platoon 2",
              "order": 514,
              "parent_id": 508,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 671,
              "items": [],
              "name": "Platoon 3",
              "order": 527,
              "parent_id": 508,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 513,
              "items": [],
              "name": "Public - Javni",
              "order": 554,
              "parent_id": 508,
              "topic": "Public channel "
            },
            {
              "clients": 0,
              "id": 698,
              "items": [],
              "name": "Platoon 4",
              "order": 671,
              "parent_id": 508,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 515,
              "items": [],
              "name": "Stronghold/CW/Adv",
              "order": 698,
              "parent_id": 508,
              "topic": ""
            }
          ],
          "name": "World of Tanks",
          "order": 507,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 693,
          "items": [],
          "name": "Field Commanders Lounge",
          "order": 508,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 457,
          "items": [],
          "name": "[*cspacer08]--",
          "order": 682,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 456,
          "items": [
            {
              "clients": 0,
              "id": 446,
              "items": [
                {
                  "clients": 0,
                  "id": 17,
                  "items": [],
                  "name": "Chillout Lounge",
                  "order": 0,
                  "parent_id": 446,
                  "topic": ""
                }
              ],
              "name": "Musik Channel",
              "order": 0,
              "parent_id": 456,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 21,
              "items": [
                {
                  "clients": 0,
                  "id": 22,
                  "items": [],
                  "name": "~~ Kurz AFK",
                  "order": 0,
                  "parent_id": 21,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 23,
                  "items": [],
                  "name": "~~ Länger AFK",
                  "order": 22,
                  "parent_id": 21,
                  "topic": ""
                }
              ],
              "name": "AFK",
              "order": 63,
              "parent_id": 456,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 63,
              "items": [
                {
                  "clients": 0,
                  "id": 472,
                  "items": [],
                  "name": "Bitte Nicht Anstupsen",
                  "order": 0,
                  "parent_id": 63,
                  "topic": ""
                }
              ],
              "name": "Anderes TS Bitte Anstupsen",
              "order": 446,
              "parent_id": 456,
              "topic": ""
            }
          ],
          "name": "[cspacer03]\"Talk Room\"",
          "order": 683,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 682,
          "items": [
            {
              "clients": 0,
              "id": 678,
              "items": [],
              "name": "CS GO",
              "order": 0,
              "parent_id": 682,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 711,
              "items": [],
              "name": "GZ coop",
              "order": 662,
              "parent_id": 682,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 662,
              "items": [],
              "name": "BL coop",
              "order": 675,
              "parent_id": 682,
              "topic": "Borderlands coop"
            },
            {
              "clients": 0,
              "id": 675,
              "items": [],
              "name": "League of Legends",
              "order": 677,
              "parent_id": 682,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 679,
              "items": [],
              "name": "CSGO MM",
              "order": 678,
              "parent_id": 682,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 677,
              "items": [],
              "name": "Battlefield",
              "order": 679,
              "parent_id": 682,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 692,
              "items": [],
              "name": "S.W.A.T.4/Advance Wars/ S.T.A.L.K.E.R. 2",
              "order": 711,
              "parent_id": 682,
              "topic": "Tactical Trainings"
            }
          ],
          "name": "[cspacer09]'Gaming Zone'",
          "order": 684,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 683,
          "items": [],
          "name": "[*cspacer10]--",
          "order": 693,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "qHl4Vhloa4+B1UHNdIVQXm6ikNc=",
    "platform": "Linux",
    "created": 1358632035,
    "uptime": 6024157,
    "steam_id": null,
    "domain": null,
    "id": 10454543,
    "ip": "82.165.37.158",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "Paris",
    "description": "Herzlich Willkommen bei den BAND-OF-SOLDIERZ. Lasst die Tasten glühen und recht viel Blei versprühen.",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1768642137,
    "score": 0,
    "last_online": 1776519022,
    "icon": null,
    "name": "Band of Soldierz Server",
    "connect": "82.165.37.158:9987",
    "request": "82.165.37.158:9987",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 1,
    "maxplayers": 100,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "FR",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1760048179,
    "last_update": 1776519022,
    "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": 141,
    "language": "fr",
    "parked": false,
    "app": {
      "id": 1629110,
      "steam_id": 9000043,
      "name": "Teamspeak 3",
      "url": "teamspeak-3"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Exemple de cod

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