SpellForce 2: Faith in Destiny
A Starbound Server 的 API
面向程序、网站等的 JSON
text
https://api.gamemonitoring.cn/servers/11397360json
{
"response": {
"steam_id": null,
"domain": null,
"id": 11397360,
"ip": "108.61.118.92",
"port": 21035,
"query": 21035,
"color": 0,
"city": "Piscataway",
"description": null,
"game": 65534,
"owner": null,
"boosts": 1,
"last_offline": 1774598272,
"score": 0,
"last_online": 1776240626,
"icon": null,
"name": "A Starbound Server",
"connect": "108.61.118.92:21035",
"request": "108.61.118.92:21035",
"map": "Unknown",
"gamemode": "Starbound",
"version": "1.4.4",
"numplayers": 0,
"maxplayers": 8,
"bots": 0,
"secured": false,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1774598272,
"last_update": 1776240626,
"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": 1,
"language": "en",
"parked": false,
"app": {
"id": 1609738,
"steam_id": 65534,
"name": "SpellForce 2: Faith in Destiny",
"url": "spellforce-2-faith-in-destiny"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}代码示例
php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11397360");
$data = json_decode($json, true);
var_dump($data);