JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/11537200
json
{
  "response": {
    "steam_id": "90286658367982613",
    "domain": null,
    "id": 11537200,
    "ip": "177.93.11.71",
    "port": 5000,
    "query": 5000,
    "project_id": null,
    "color": 0,
    "city": "San José",
    "description": null,
    "game": 108600,
    "owner": null,
    "boosts": 1,
    "last_offline": 1781318577,
    "last_online": 1781267483,
    "icon": null,
    "name": "My PZ Server",
    "connect": "177.93.11.71:5000",
    "request": "177.93.11.71:5000",
    "map": "Muldraugh, KY",
    "gamemode": "Project Zomboid",
    "version": "41.78.19",
    "numplayers": 0,
    "maxplayers": 32,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "CR",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1779355325,
    "last_update": 1781318577,
    "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": 7970,
    "language": "es",
    "parked": false,
    "app": {
      "id": 71,
      "steam_id": 108600,
      "name": "Project Zomboid",
      "url": "project-zomboid"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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