JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/10454547
json
{
  "response": {
    "channels": {
      "onlinecount": 30,
      "items": [
        {
          "clients": 1,
          "id": 106,
          "items": [
            {
              "clients": 0,
              "id": 424,
              "items": [],
              "name": "Ожидание авторизации",
              "order": 0,
              "parent_id": 106,
              "topic": ""
            }
          ],
          "name": "Lobby",
          "order": 0,
          "parent_id": 0,
          "topic": "Main Channel "
        },
        {
          "clients": 0,
          "id": 447,
          "items": [],
          "name": "MegaMek",
          "order": 1,
          "parent_id": 0,
          "topic": "MegaMek is an unofficial, online version of the Classic BattleTech board game."
        },
        {
          "clients": 0,
          "id": 160,
          "items": [],
          "name": "AFK",
          "order": 63,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 210,
          "items": [
            {
              "clients": 0,
              "id": 211,
              "items": [],
              "name": "Lance 1",
              "order": 0,
              "parent_id": 210,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 212,
              "items": [],
              "name": "Lance 2",
              "order": 211,
              "parent_id": 210,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 229,
              "items": [],
              "name": "Lance 3",
              "order": 212,
              "parent_id": 210,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 322,
              "items": [
                {
                  "clients": 0,
                  "id": 910,
                  "items": [],
                  "name": "CW Scouting",
                  "order": 0,
                  "parent_id": 322,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 718,
                  "items": [],
                  "name": "InnerSphereWars",
                  "order": 572,
                  "parent_id": 322,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 1565,
                  "items": [],
                  "name": "NBT MWO",
                  "order": 718,
                  "parent_id": 322,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 572,
                  "items": [
                    {
                      "clients": 0,
                      "id": 734,
                      "items": [],
                      "name": "Phonetic Alphabet",
                      "order": 0,
                      "parent_id": 572,
                      "topic": ""
                    }
                  ],
                  "name": "CW Invasion",
                  "order": 910,
                  "parent_id": 322,
                  "topic": ""
                }
              ],
              "name": "Drops",
              "order": 229,
              "parent_id": 210,
              "topic": ""
            }
          ],
          "name": "Mechwarrior Online",
          "order": 106,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 282,
          "items": [],
          "name": "Друзья",
          "order": 160,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 2716,
          "items": [],
          "name": "MechWarrior 5",
          "order": 210,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 162,
          "items": [
            {
              "clients": 0,
              "id": 353,
              "items": [],
              "name": "S.O.L.A.H.M.A",
              "order": 0,
              "parent_id": 162,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 340,
              "items": [],
              "name": "Demon Slayer",
              "order": 317,
              "parent_id": 162,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 2525,
              "items": [],
              "name": "TEStO",
              "order": 340,
              "parent_id": 162,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 1560,
              "items": [],
              "name": "Overwatch",
              "order": 353,
              "parent_id": 162,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 317,
              "items": [],
              "name": "Heroes of the Storm",
              "order": 1560,
              "parent_id": 162,
              "topic": ""
            }
          ],
          "name": "Другие игры",
          "order": 282,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 63,
          "items": [
            {
              "clients": 0,
              "id": 101,
              "items": [],
              "name": "Black Death",
              "order": 0,
              "parent_id": 63,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 141,
              "items": [],
              "name": "Russian Death Legion HQ",
              "order": 96,
              "parent_id": 63,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 227,
              "items": [],
              "name": "Black Knight",
              "order": 101,
              "parent_id": 63,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 96,
              "items": [],
              "name": "TAU",
              "order": 102,
              "parent_id": 63,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 102,
              "items": [],
              "name": "Golden Lion",
              "order": 227,
              "parent_id": 63,
              "topic": ""
            }
          ],
          "name": "Russian Death Legion",
          "order": 447,
          "parent_id": 0,
          "topic": "RDL"
        },
        {
          "clients": 0,
          "id": 1,
          "items": [],
          "name": "MechWarrior: Living Legends",
          "order": 1697,
          "parent_id": 0,
          "topic": "RUS MWLL #1"
        },
        {
          "clients": 0,
          "id": 1697,
          "items": [],
          "name": "Battletech",
          "order": 2716,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "7ChS09W0YZxm+XObUSi3VZTOjKg=",
    "platform": "Linux",
    "created": 1274871896,
    "uptime": 3569423,
    "steam_id": null,
    "domain": null,
    "id": 10454547,
    "ip": "195.2.88.18",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "Moscow",
    "description": "Welcome to RDL Site www.rdlcom.net for latest infos.",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1772949093,
    "score": 0,
    "last_online": 1776519024,
    "icon": null,
    "name": "RUS Battletech (RDL)",
    "connect": "195.2.88.18:9987",
    "request": "195.2.88.18:9987",
    "map": null,
    "gamemode": null,
    "version": "3.2.0 Build: 1525759880",
    "numplayers": 1,
    "maxplayers": 256,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "RU",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1760048183,
    "last_update": 1776519024,
    "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": 144,
    "language": "ru",
    "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/10454547");
$data = json_decode($json, true);
var_dump($data);