面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/659723
json
{
  "response": {
    "fps": 36,
    "fps_avg": 51,
    "entities_count": 193012,
    "world_seed": 427142923,
    "world_size": 4250,
    "steam_id": "90284799145969667",
    "domain": null,
    "id": 659723,
    "ip": "45.92.38.38",
    "port": 28055,
    "query": 28056,
    "color": 0,
    "city": "Stockholm",
    "description": "![Lost Vikings PVE](https://lh3.googleusercontent.com/y_3A1tsSEyo0Pm36J-Eg-3Z8RHj8xuqOUhksH4-xyszcZiSDf7nxTCMpxA8DQKX448DSjSaSFVYvl6pBC_Ce3mRiWOZCfRkbInAyJjSkPJx3jKcYn1oo5nwrPJYZU0LCseDNAzvLEJ8uFZptaYrJ4NOc4kFvEr5fzK3LbmcJhCwhPonbKn0XQ8kehISxSvHdjacYOpNO1H86mTRjzc8aqu7kBvKFmcHGUIsMzkigiM_h8tr-KFstEEaNv-DKWKBr4qc74i_fq03lCLMcm7MZUHX_jdjMnisnpCuu34JIqXAnl07W5J6nFcpTU52AwrYgNGqLf3IoLNqkGp5ropYCz6FrKgCcA_gGqsGfXGbkoO0m0XsZQo6Ppst69t9vgWh_eB_mt7vD9ffei0tnf49az-l7Kotq_ciK1WeQsoW41sBwa02XHLJYZ2lQubu5M-WOZq2FKeNJ7DZa0BB_-kE9SmkHKyWelZzttbMe7J5HYU9cwxn0ePQD2GEjpUyutexV5ZGZJY1Yf8-toNdiKF-CF-4Xn1JYMmvP8M0aNNUzitoLr5KgkpY1_TzlWvKPOm0qiZ49SOL5FPuqrJuXoXa3V9cXIdBU-Y3BPc-lDaZY2QqmaEDrQ8V6gsDO9lB0aNRmVmCcYUfjup8QtO5K5deBsFeUH8QzBUco7DYnXeprd2JiAyCEsL3TVpabs3IRAhQIoA6H_5EyMDPqg4uzV0ESG5e5dlUwwCCXuaA59E620hAXjvk3csrTyuzFtujiJA=w1524-h596-no?authuser=0)\nIt's NOT allowed to kill/greif other players.\r\n English in chat.\r\n Any form of racist/sexist/oppressive/degrading behaviour is forbidden.\r\n Map-Wipe first thusday every month. No BP-wipe. Limited decay/upkeep. Increased Stacksizes. Several bradley's And more!\r\n Keep it nice and friendly!\r\n Spreading lies/misinformation regarding players or otherwise is forbidden.\r\n Guardians are server moderators. They are very helpfull to those that obey the rules.\r\n Everybody is welcome at the comunitybase and use the equipment there as long as you behave.\r\n Full set of rules and other info like plugins on our discord:\r\n https://discord.gg/4FB9tSsbQA (click view webpage for discord-link)",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776837800,
    "score": null,
    "last_online": 1776880819,
    "icon": null,
    "name": "Lost Vikings PVE",
    "connect": "45.92.38.38:28055",
    "request": "45.92.38.38:28056",
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": "2623",
    "numplayers": 3,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "SE",
    "status": true,
    "votes": 0,
    "points": 63,
    "add_date": 1670105221,
    "last_update": 1776880819,
    "banned": false,
    "wipe": 1775154186,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 1346,
    "language": "sv",
    "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/659723");
$data = json_decode($json, true);
var_dump($data);