面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/4295674
json
{
  "response": {
    "fps": 26,
    "fps_avg": 26,
    "entities_count": 120783,
    "world_seed": 123456,
    "world_size": 4500,
    "steam_id": 90284662521210900,
    "domain": null,
    "id": 4295674,
    "ip": "91.189.178.186",
    "port": 28215,
    "query": 28216,
    "color": 0,
    "city": "Oslo",
    "description": "![chill rust server with raidable base  (T3)  and Base Raiding NP](https://www.dropbox.com/scl/fi/u7twgz7fq0zxjqldl3cwt/header.png?rlkey=ora301bqx5xxwj7u2x2grzz4q&dl=1)\nThere's basically no rules in Rust, but what would be some unwritten ones basically  everyone knows?  Some that come to mind:  * Kill first *   * Treat every naked like they are crafting a weapon * * There's always 1 more guy  Check left and right every time you open your door for door campers  Any team that has even just 1 more player than yours, is a zerg  Everyone hates roof campers  If you try to eoka someone in the back, it'll never go off 1st time and you'll die  Someone can always play more than you  As soon as you've logged off, consider your base offlined and  No VAC/Game bans. - No Russians/Belarusians. - No Russian language in general chat.  People are free to speak whatever language they like except russian. Don't be surprised if you get banned for being abusive. If you shot @ someone don`t be surprised that you lett all hell lose           server.queryport 28027 rcon.web 1 rcon.ip 104.234.251.154 rcon.port 28026 app.listenip 104.234.251.154 app.port 28092 maxteamsize 8 antihack.enabled true antihack.admincheat true chat.enabled true chat.serverlog true server.hostname RUST",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776608603,
    "score": 0,
    "last_online": 1776981622,
    "icon": null,
    "name": "RUST Server",
    "connect": "91.189.178.186:28215",
    "request": "91.189.178.186:28216",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2623",
    "numplayers": 0,
    "maxplayers": 100,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "NO",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1715896058,
    "last_update": 1776981622,
    "banned": false,
    "wipe": 1776608732,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 2935,
    "language": "no",
    "parked": false,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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