JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/10490575
json
{
  "response": {
    "steam_id": null,
    "domain": "play.minewild.hu",
    "id": 10490575,
    "ip": "185.137.94.62",
    "port": 25565,
    "query": 25565,
    "project_id": null,
    "color": 0,
    "city": "Frankfurt am Main",
    "description": null,
    "game": 9000034,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779632049,
    "last_online": 1780686691,
    "icon": null,
    "name": "⭐ MINEWILD ▪ www.minewild.hu ▪ 🗡 Factions ▪ 🎣 ??? ▪ 🔱 ??? ▪ ⚗ ???",
    "connect": "play.minewild.hu:25565",
    "request": "185.137.94.62:25565",
    "map": null,
    "gamemode": null,
    "version": "1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11",
    "numplayers": 0,
    "maxplayers": 1000,
    "bots": 0,
    "secured": null,
    "private": null,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1761122452,
    "last_update": 1780686691,
    "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": 3453,
    "language": "de",
    "parked": false,
    "app": {
      "id": 169,
      "steam_id": 9000034,
      "name": "Minecraft",
      "url": "minecraft"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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