Counter-Strike: Source
的 API
面向程序、网站等的 JSON
text
https://api.gamemonitoring.cn/servers/11370243json
{
"response": {
"steam_id": null,
"domain": null,
"id": 11370243,
"ip": "216.201.73.60",
"port": 1045,
"query": 1045,
"color": 0,
"city": "Ashburn",
"description": null,
"game": 240,
"owner": null,
"boosts": 1,
"last_offline": 1776121280,
"score": 0,
"last_online": 1775442624,
"icon": null,
"name": null,
"connect": null,
"request": "216.201.73.60:1045",
"map": null,
"gamemode": null,
"version": null,
"numplayers": 0,
"maxplayers": 26,
"bots": 0,
"secured": null,
"private": false,
"country": "US",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1774595562,
"last_update": 1776121280,
"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": 2042,
"language": "en",
"parked": false,
"app": {
"id": 5,
"steam_id": 240,
"name": "Counter-Strike: Source",
"url": "counter-strike-source"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}代码示例
php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11370243");
$data = json_decode($json, true);
var_dump($data);