Rust
Naked and Afraid ZA 的 API
面向程序、网站等的 JSON
text
https://api.gamemonitoring.cn/servers/11261163json
{
"response": {
"fps": 30,
"fps_avg": 29,
"entities_count": 83517,
"world_seed": 1157301299,
"world_size": 3700,
"steam_id": "90284791223968799",
"domain": null,
"id": 11261163,
"ip": "41.76.213.81",
"port": 28035,
"query": 28036,
"color": 0,
"city": "Sandton",
"description": "\nVanilla SA Server | Monthly Wipe | PvP | Community| Welcome to Naked and Afraid – ZA, where every wipe starts the same: you're cold, naked, and some guy with a rock is already sprinting at you. South Africa's favourite Rust server — low ping, high trauma. Eina.",
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1776819797,
"score": 0,
"last_online": 1776878420,
"icon": null,
"name": "Naked and Afraid ZA",
"connect": "41.76.213.81:28035",
"request": "41.76.213.81:28036",
"map": "Procedural Map",
"gamemode": "Survival",
"version": "2623",
"numplayers": 4,
"maxplayers": 100,
"bots": 0,
"secured": true,
"private": false,
"country": "ZA",
"status": true,
"votes": 0,
"points": 62,
"add_date": 1774555222,
"last_update": 1776878420,
"banned": false,
"wipe": 1775175003,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 1933,
"language": "en",
"parked": false,
"app": {
"id": 12,
"steam_id": 252490,
"name": "Rust",
"url": "rust"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}代码示例
php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11261163");
$data = json_decode($json, true);
var_dump($data);