JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/342318
json
{
  "response": {
    "fps": 40,
    "fps_avg": 39,
    "entities_count": 58273,
    "world_seed": 61,
    "world_size": 3500,
    "steam_id": "90286603759812628",
    "domain": null,
    "id": 342318,
    "ip": "23.111.191.218",
    "port": 28026,
    "query": 28016,
    "color": 0,
    "city": "Atlanta",
    "description": "![tehwebz modded [Mature|No BPs/WB|10x+|Premium+]](https://rust.tehwebz.net/modded/headers/modheaderG8.png)\nFirst Thursday of the Month Wipes (forced @ 2pm ET) - For Friendly and Mature Players Only. Discrimination of any type will not be tolerated. View the Website for a Complete List of the Mods, and Contact Info. \r\n\r\n • Small loot changes - 3x comps, 2x scrap, no 'junk' \r\n • QuickSmelt & Better Recyclers \r\n • Teleport - /home & /tpr - 10min cooldown \r\n • Cars spawn with T3 parts - Helicopters spawn \r\n • SignArtist - /sil & /silt -> NSFW = BAN\r\n\r\nNew accounts or cheaters with a recent VAC/gameban or 2+ = banned. \r\n\r\n↓ more information - visit website ↓",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780595663,
    "last_online": 1780596794,
    "icon": null,
    "name": "tehwebz modded [Mature|No BPs/WB|10x+|Premium+]",
    "connect": "23.111.191.218:28026",
    "request": "23.111.191.218:28016",
    "map": "Custom Map",
    "gamemode": "Survival",
    "version": "2627",
    "numplayers": 1,
    "maxplayers": 100,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1593283047,
    "last_update": 1780596794,
    "banned": false,
    "wipe": 1780595632,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 4525,
    "language": "en",
    "parked": false,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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