JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/11142913
json
{
  "response": {
    "channels": {
      "onlinecount": 32,
      "items": [
        {
          "clients": 0,
          "id": 1,
          "items": [
            {
              "clients": 0,
              "id": 28,
              "items": [],
              "name": "Super Admins",
              "order": 0,
              "parent_id": 1,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 29,
              "items": [],
              "name": "Head Admins",
              "order": 28,
              "parent_id": 1,
              "topic": ""
            },
            {
              "clients": -1,
              "id": 30,
              "items": [],
              "name": "Server Admins",
              "order": 29,
              "parent_id": 1,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 31,
              "items": [],
              "name": "Rookie Admins",
              "order": 30,
              "parent_id": 1,
              "topic": ""
            },
            {
              "clients": -1,
              "id": 32,
              "items": [],
              "name": "Members",
              "order": 31,
              "parent_id": 1,
              "topic": ""
            }
          ],
          "name": "HQ",
          "order": 0,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 1,
          "id": 21,
          "items": [
            {
              "clients": 0,
              "id": 24,
              "items": [],
              "name": "Public #1",
              "order": 0,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 26,
              "items": [],
              "name": "Public #2",
              "order": 24,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 27,
              "items": [],
              "name": "Public #3",
              "order": 26,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 48,
              "items": [],
              "name": "Public #4",
              "order": 27,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 49,
              "items": [],
              "name": "Public #5",
              "order": 48,
              "parent_id": 21,
              "topic": ""
            }
          ],
          "name": "PULBIC noname.zone - READ ME",
          "order": 1,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 36,
          "items": [
            {
              "clients": 0,
              "id": 37,
              "items": [
                {
                  "clients": 0,
                  "id": 40,
                  "items": [],
                  "name": "Attack",
                  "order": 0,
                  "parent_id": 37,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 41,
                  "items": [],
                  "name": "Defense",
                  "order": 40,
                  "parent_id": 37,
                  "topic": ""
                }
              ],
              "name": "Lobby #1",
              "order": 0,
              "parent_id": 36,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 42,
              "items": [
                {
                  "clients": 0,
                  "id": 43,
                  "items": [],
                  "name": "Attack",
                  "order": 0,
                  "parent_id": 42,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 44,
                  "items": [],
                  "name": "Defense",
                  "order": 43,
                  "parent_id": 42,
                  "topic": ""
                }
              ],
              "name": "Lobby #2",
              "order": 37,
              "parent_id": 36,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 45,
              "items": [
                {
                  "clients": 0,
                  "id": 46,
                  "items": [],
                  "name": "Attack",
                  "order": 0,
                  "parent_id": 45,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 47,
                  "items": [],
                  "name": "Defense",
                  "order": 46,
                  "parent_id": 45,
                  "topic": ""
                }
              ],
              "name": "Lobby #3",
              "order": 42,
              "parent_id": 36,
              "topic": ""
            }
          ],
          "name": "Call of Duty",
          "order": 21,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 59,
          "items": [],
          "name": "ExtraCrispy",
          "order": 36,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 51,
          "items": [
            {
              "clients": 0,
              "id": 57,
              "items": [],
              "name": "Dutch",
              "order": 0,
              "parent_id": 51,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 58,
              "items": [],
              "name": "Supra s channel",
              "order": 52,
              "parent_id": 51,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 52,
              "items": [
                {
                  "clients": 0,
                  "id": 53,
                  "items": [],
                  "name": "Rincor de pensar",
                  "order": 0,
                  "parent_id": 52,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 55,
                  "items": [],
                  "name": "Los Pros del faceit",
                  "order": 53,
                  "parent_id": 52,
                  "topic": ""
                }
              ],
              "name": "Nemesux",
              "order": 57,
              "parent_id": 51,
              "topic": ""
            }
          ],
          "name": "Personal channels",
          "order": 50,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 60,
          "items": [],
          "name": "ExtraCrispy2",
          "order": 59,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 61,
          "items": [],
          "name": "ExtraCrispy3",
          "order": 60,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 50,
          "items": [],
          "name": "[spacer2]",
          "order": 61,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "ZqvHcas6rz17mHbZxwimEloCrQs=",
    "platform": "Linux",
    "created": 1545927492,
    "uptime": 5817821,
    "steam_id": null,
    "domain": null,
    "id": 11142913,
    "ip": "176.31.226.111",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "Roubaix",
    "description": "Welcome to nN\\p TS3 - noname.zone",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1774235512,
    "score": 0,
    "last_online": 1776897618,
    "icon": null,
    "name": "nN\\p TS3 - noname.zone",
    "connect": "176.31.226.111:9987",
    "request": "176.31.226.111:9987",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 1,
    "maxplayers": 32,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "FR",
    "status": true,
    "votes": 0,
    "points": 61,
    "add_date": 1770933678,
    "last_update": 1776897618,
    "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": 128,
    "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/11142913");
$data = json_decode($json, true);
var_dump($data);