JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/10454549
json
{
  "response": {
    "channels": {
      "onlinecount": 48,
      "items": [
        {
          "clients": 0,
          "id": 14,
          "items": [],
          "name": "[cspacer0]___",
          "order": 0,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 15,
          "items": [
            {
              "clients": 0,
              "id": 13,
              "items": [],
              "name": "VG HQ",
              "order": 0,
              "parent_id": 15,
              "topic": ""
            },
            {
              "clients": 1,
              "id": 1,
              "items": [
                {
                  "clients": 0,
                  "id": 56,
                  "items": [],
                  "name": "Cinema",
                  "order": 0,
                  "parent_id": 1,
                  "topic": ""
                },
                {
                  "clients": 2,
                  "id": 2,
                  "items": [],
                  "name": "Lounge",
                  "order": 3,
                  "parent_id": 1,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 3,
                  "items": [],
                  "name": "Support",
                  "order": 56,
                  "parent_id": 1,
                  "topic": ""
                }
              ],
              "name": "Welcome Channel",
              "order": 13,
              "parent_id": 15,
              "topic": "Default Channel has no topic"
            }
          ],
          "name": "[cspacer1]  Welcome to VETERANS-GAMING",
          "order": 14,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 17,
          "items": [],
          "name": "[cspacer3]---",
          "order": 15,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 31,
          "items": [
            {
              "clients": 0,
              "id": 64,
              "items": [],
              "name": "Public Channel 1",
              "order": 0,
              "parent_id": 31,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 65,
              "items": [],
              "name": "Public Channel 2",
              "order": 64,
              "parent_id": 31,
              "topic": ""
            },
            {
              "clients": 3,
              "id": 218,
              "items": [],
              "name": "Public Channel 3",
              "order": 65,
              "parent_id": 31,
              "topic": ""
            }
          ],
          "name": "[cspacer12]Public Channels",
          "order": 17,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 19,
          "items": [],
          "name": "[cspacer5]---",
          "order": 18,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 23,
          "items": [
            {
              "clients": 0,
              "id": 25,
              "items": [
                {
                  "clients": 0,
                  "id": 152,
                  "items": [],
                  "name": "Antistasi Channel",
                  "order": 0,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 51,
                  "items": [],
                  "name": "VG Insurgency Server",
                  "order": 24,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 53,
                  "items": [
                    {
                      "clients": 0,
                      "id": 193,
                      "items": [],
                      "name": "TFAR",
                      "order": 0,
                      "parent_id": 53,
                      "topic": ""
                    }
                  ],
                  "name": "Arma 3 Event PW: OPFORTown",
                  "order": 51,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 141,
                  "items": [],
                  "name": "VG Insurgency ACE",
                  "order": 53,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 186,
                  "items": [],
                  "name": "VG Admin/Development Channel 18+",
                  "order": 141,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 206,
                  "items": [
                    {
                      "clients": 0,
                      "id": 208,
                      "items": [],
                      "name": "Liberation",
                      "order": 0,
                      "parent_id": 206,
                      "topic": ""
                    },
                    {
                      "clients": 0,
                      "id": 228,
                      "items": [],
                      "name": "Event/Training",
                      "order": 208,
                      "parent_id": 206,
                      "topic": ""
                    }
                  ],
                  "name": "Arma 3 - Arma Evening Games",
                  "order": 152,
                  "parent_id": 25,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 24,
                  "items": [
                    {
                      "clients": 0,
                      "id": 140,
                      "items": [],
                      "name": "TaskForceRadio",
                      "order": 0,
                      "parent_id": 24,
                      "topic": ""
                    }
                  ],
                  "name": "Arma 3 Mike Force",
                  "order": 206,
                  "parent_id": 25,
                  "topic": ""
                }
              ],
              "name": "Arma 3",
              "order": 0,
              "parent_id": 23,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 42,
              "items": [],
              "name": "Arma Mission editing",
              "order": 25,
              "parent_id": 23,
              "topic": ""
            }
          ],
          "name": "[cspacer6]Arma Series",
          "order": 19,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 223,
          "items": [],
          "name": "[cspacer7]---",
          "order": 23,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 27,
          "items": [
            {
              "clients": 0,
              "id": 40,
              "items": [],
              "name": "PITN's Playhouse",
              "order": 0,
              "parent_id": 27,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 50,
              "items": [],
              "name": "Melons's WARNO shed",
              "order": 40,
              "parent_id": 27,
              "topic": "Formerly: Keed's Desync Shelter & Melon's Woodshed in the Aussie outback"
            },
            {
              "clients": 0,
              "id": 219,
              "items": [],
              "name": "Grand Theft Auto",
              "order": 50,
              "parent_id": 27,
              "topic": ""
            },
            {
              "clients": 2,
              "id": 220,
              "items": [],
              "name": "VG Down Under",
              "order": 219,
              "parent_id": 27,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 38,
              "items": [],
              "name": "CC's Grotto",
              "order": 220,
              "parent_id": 27,
              "topic": ""
            }
          ],
          "name": "[cspacer10]Other",
          "order": 26,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 16,
          "items": [
            {
              "clients": 0,
              "id": 202,
              "items": [],
              "name": "AFK",
              "order": 0,
              "parent_id": 16,
              "topic": ""
            }
          ],
          "name": "[cspacer2]---",
          "order": 27,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 18,
          "items": [
            {
              "clients": 0,
              "id": 21,
              "items": [
                {
                  "clients": 0,
                  "id": 22,
                  "items": [],
                  "name": "PR Event",
                  "order": 0,
                  "parent_id": 21,
                  "topic": ""
                }
              ],
              "name": "PR CO-OP",
              "order": 0,
              "parent_id": 18,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 173,
              "items": [],
              "name": "PR Coffee Bar",
              "order": 21,
              "parent_id": 18,
              "topic": "PR COOP Server"
            },
            {
              "clients": 0,
              "id": 20,
              "items": [],
              "name": "PR Admins",
              "order": 173,
              "parent_id": 18,
              "topic": "!Ban [name] Teamwork"
            }
          ],
          "name": "[cspacer4]Project Reality",
          "order": 30,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 30,
          "items": [],
          "name": "[cspacer11]---",
          "order": 31,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 225,
          "items": [
            {
              "clients": 0,
              "id": 221,
              "items": [
                {
                  "clients": 0,
                  "id": 224,
                  "items": [],
                  "name": "Pilots Lounge",
                  "order": 0,
                  "parent_id": 221,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 226,
                  "items": [],
                  "name": "Mission Briefings",
                  "order": 224,
                  "parent_id": 221,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 227,
                  "items": [],
                  "name": "Flight",
                  "order": 226,
                  "parent_id": 221,
                  "topic": ""
                }
              ],
              "name": "Falcon BMS 4.37.3",
              "order": 0,
              "parent_id": 225,
              "topic": ""
            }
          ],
          "name": "[cspacer6]Falcon BMS",
          "order": 223,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 26,
          "items": [],
          "name": "[cspacer9]---",
          "order": 225,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "KyhLlvOwjE785qfkrsIdsfMdj8A=",
    "platform": "Windows",
    "created": 1492706805,
    "uptime": 2978953,
    "steam_id": null,
    "domain": null,
    "id": 10454549,
    "ip": "5.9.23.136",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "Falkenstein",
    "description": "Welcome to VETERANS-GAMING TeamSpeak, check www.veterans-gaming.com for latest information",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1773539504,
    "score": 0,
    "last_online": 1776519019,
    "icon": null,
    "name": "VETERANS-GAMING",
    "connect": "5.9.23.136:9987",
    "request": "5.9.23.136:9987",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 8,
    "maxplayers": 64,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 66,
    "add_date": 1760048186,
    "last_update": 1776519019,
    "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": 74,
    "language": "de",
    "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/10454549");
$data = json_decode($json, true);
var_dump($data);