<BAD>Server #3(CBM)(NOOBS WELCOME) 的 API

面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/1470557
json
{
  "response": {
    "steam_id": "90284423394745375",
    "domain": null,
    "id": 1470557,
    "ip": "71.142.124.243",
    "port": 27065,
    "query": 27066,
    "color": 0,
    "city": "Chapel Hill",
    "description": "",
    "game": 4920,
    "owner": null,
    "boosts": 1,
    "last_offline": 1774697547,
    "score": null,
    "last_online": 1776438638,
    "icon": null,
    "name": "<BAD>Server #3(CBM)(NOOBS WELCOME)",
    "connect": "71.142.124.243:27065",
    "request": "71.142.124.243:27066",
    "map": "ns2_biodome",
    "gamemode": "Natural Selection 2",
    "version": "1.0.0.0",
    "numplayers": 1,
    "maxplayers": 20,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 34,
    "add_date": 1697314840,
    "last_update": 1776438638,
    "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": 4,
    "language": "en",
    "parked": false,
    "app": {
      "id": 91,
      "steam_id": 4920,
      "name": "Natural Selection 2",
      "url": "natural-selection-2"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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