API dla The Rusty Haven
JSON dla programów, stron i innych
text
json
{
"response": {
"fps": 53,
"fps_avg": 53,
"entities_count": 144183,
"world_seed": 2147483647,
"world_size": 5000,
"steam_id": "90286633379749906",
"domain": null,
"id": 9720921,
"ip": "83.223.206.236",
"port": 28000,
"query": 28015,
"project_id": null,
"color": 0,
"city": "Washington",
"description": "\nWelcome to The Rusty Haven. A PvE server welcoming of newcomers. Be chill, no griefing, and have fun!",
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1780664666,
"last_online": 1780679434,
"icon": null,
"name": "The Rusty Haven",
"connect": "83.223.206.236:28000",
"request": "83.223.206.236:28015",
"map": "Procedural Map",
"gamemode": "Vanilla",
"version": "2627",
"numplayers": 0,
"maxplayers": 50,
"bots": 0,
"secured": false,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 60,
"add_date": 1752139785,
"last_update": 1780679434,
"banned": false,
"wipe": 1780596811,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 1,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 3836,
"language": "en",
"parked": false,
"app": {
"id": 12,
"steam_id": 252490,
"name": "Rust",
"url": "rust"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/9720921");
$data = json_decode($json, true);
var_dump($data);