Broken Republic 的 API
面向程序、网站等的 JSON
text
json
{
"response": {
"fps": 60,
"fps_avg": 60,
"entities_count": 86963,
"world_seed": 1208999380,
"world_size": 4000,
"steam_id": "90286592238153751",
"domain": null,
"id": 11103228,
"ip": "66.51.98.64",
"port": 28025,
"query": 28026,
"color": 0,
"city": "Los Angeles",
"description": "\nWelcome to our server! \r\n -Monthly wipes on the 1st of every month \r\n -Mostly Vanilla \r\n -Minis spawn on roads \r\n -Rules- \r\n 1. No cheating, exploiting, or griefing. \r\n 2. Respect all players and admins. \r\n 3. No spamming or offensive language. \r\n \r\n -Enjoy your stay and have fun!",
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1780574066,
"last_online": 1780581635,
"icon": null,
"name": "Broken Republic",
"connect": "66.51.98.64:28025",
"request": "66.51.98.64:28026",
"map": "Procedural Map",
"gamemode": "Survival",
"version": "2625",
"numplayers": 0,
"maxplayers": 50,
"bots": 0,
"secured": true,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 60,
"add_date": 1770030028,
"last_update": 1780581635,
"banned": false,
"wipe": 1780574375,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 4190,
"language": "en",
"parked": false,
"app": {
"id": 252490,
"steam_id": 252490,
"name": "Rust",
"url": "rust"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}代码示例
php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11103228");
$data = json_decode($json, true);
var_dump($data);