Valve Left4Dead 2 Hong Kong Server (srcds1028-hkg1.141.133) 的 API

面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/1957418
json
{
  "response": {
    "steam_id": "90284528554845191",
    "domain": null,
    "id": 1957418,
    "ip": "103.28.54.214",
    "port": 27147,
    "query": 27147,
    "color": 0,
    "city": "Ha Kwai Chung",
    "description": "",
    "game": 550,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776274915,
    "score": null,
    "last_online": 1776364254,
    "icon": null,
    "name": "Valve Left4Dead 2 Hong Kong Server (srcds1028-hkg1.141.133)",
    "connect": "103.28.54.214:27147",
    "request": "103.28.54.214:27147",
    "map": "c9m1_alleys",
    "gamemode": "Left 4 Dead 2",
    "version": "2.2.4.3",
    "numplayers": 2,
    "maxplayers": 4,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "HK",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1700910955,
    "last_update": 1776364254,
    "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": 6644,
    "language": "zh",
    "parked": false,
    "app": {
      "id": 11,
      "steam_id": 550,
      "name": "Left 4 Dead 2",
      "url": "left-4-dead-2"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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