API dla My Rust Server
JSON dla programów, stron i innych
text
json
{
"response": {
"fps": 108,
"fps_avg": 112,
"entities_count": 195831,
"world_seed": 1129856818,
"world_size": 6000,
"steam_id": "90286605682771977",
"domain": null,
"id": 11645030,
"ip": "75.154.161.94",
"port": 28015,
"query": 28016,
"color": 0,
"city": "Sainte-Christine-d'Auvergne",
"description": null,
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1780600465,
"last_online": 1780605061,
"icon": null,
"name": "My Rust Server",
"connect": "75.154.161.94:28015",
"request": "75.154.161.94:28016",
"map": "Procedural Map",
"gamemode": "Vanilla",
"version": "2627",
"numplayers": 1,
"maxplayers": 50,
"bots": 0,
"secured": true,
"private": false,
"country": "CA",
"status": true,
"votes": 0,
"points": 31,
"add_date": 1780177444,
"last_update": 1780605061,
"banned": false,
"wipe": 1780598534,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 6071,
"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/11645030");
$data = json_decode($json, true);
var_dump($data);