Garry's Mod
Potato xDSL 的 API
面向程序、网站等的 JSON
text
https://api.gamemonitoring.cn/servers/9893796json
{
"response": {
"steam_id": null,
"domain": null,
"id": 9893796,
"ip": null,
"port": null,
"query": null,
"color": 0,
"city": null,
"description": null,
"game": 4000,
"owner": 124896,
"boosts": 1,
"last_offline": 1759763036,
"score": 0,
"last_online": 1756468227,
"icon": null,
"name": "Potato xDSL",
"connect": null,
"request": null,
"map": "gm_hillscape_d",
"gamemode": "Sandbox",
"version": null,
"numplayers": 0,
"maxplayers": 12,
"bots": 0,
"secured": false,
"private": false,
"country": "DE",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1753766714,
"last_update": 1759763036,
"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": 3055,
"language": "de",
"parked": true,
"app": {
"id": 30,
"steam_id": 4000,
"name": "Garry's Mod",
"url": "garrys-mod"
},
"server_owner": {
"username": "Fwfmzv",
"avatar": "d024acbe-7514-41d2-b086-f63b30c69719.jpg",
"last_online": 1764935020
},
"mods": [
{
"id": 1793,
"name": "PvP"
},
{
"id": 1794,
"name": "Sandbox"
},
{
"id": 1790,
"name": "Build"
},
{
"id": 1792,
"name": "PAC"
},
{
"id": 1796,
"name": "Wire"
},
{
"id": 1791,
"name": "E2"
},
{
"id": 1795,
"name": "VR"
},
{
"id": 1788,
"name": "ACF"
},
{
"id": 1789,
"name": "PAC 3"
}
],
"disabled_modules": []
}
}代码示例
php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/9893796");
$data = json_decode($json, true);
var_dump($data);