API dla The Sheriff's Wild West
JSON dla programów, stron i innych
text
json
{
"response": {
"fps": 207,
"fps_avg": 206,
"entities_count": 112952,
"world_seed": 1,
"world_size": 4500,
"steam_id": "90286588594063367",
"domain": null,
"id": 11717892,
"ip": "172.240.1.179",
"port": 28015,
"query": 28017,
"color": 0,
"city": "Ashburn",
"description": "Rules\r\nYou must have a mic or TTS\r\nNo trolling / toxicness\r\nNo placing traps outside another players home/base\r\nNo NSFW\r\n18+ only\r\nOnly can raid while players are online, breaking this rule is an instant ban.\r\nDo not bully new players\r\nDo not base too close to other players, exceptions made on a case by case basis, for example RP buildings.\r\nRP is encouraged but not forced.",
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1780324091,
"last_online": 1780588234,
"icon": null,
"name": "The Sheriff's Wild West",
"connect": "172.240.1.179:28015",
"request": "172.240.1.179:28017",
"map": "Procedural Map",
"gamemode": "Survival",
"version": "2625",
"numplayers": 0,
"maxplayers": 61,
"bots": 0,
"secured": true,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 60,
"add_date": 1780324091,
"last_update": 1780588234,
"banned": false,
"wipe": 1778180053,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 5985,
"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/11717892");
$data = json_decode($json, true);
var_dump($data);