API dla I Think You Should Leave
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286939492897818",
"domain": null,
"id": 11536796,
"ip": "45.45.238.231",
"port": 17200,
"query": 17200,
"project_id": null,
"color": 0,
"city": "Chicago",
"description": "Look, I'm not trying to be funny. I don't want anyone to have the worst day at Zomboid ever....",
"game": 108600,
"owner": null,
"boosts": 1,
"last_offline": 1781304234,
"last_online": 1781301177,
"icon": null,
"name": "I Think You Should Leave",
"connect": "45.45.238.231:17200",
"request": "45.45.238.231:17200",
"map": "Muldraugh, KY",
"gamemode": "Project Zomboid",
"version": "42.13",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": true,
"private": true,
"country": "US",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1779355310,
"last_update": 1781304234,
"banned": false,
"wipe": null,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": null,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 10889,
"language": "en",
"parked": false,
"app": {
"id": 71,
"steam_id": 108600,
"name": "Project Zomboid",
"url": "project-zomboid"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/11536796");
$data = json_decode($json, true);
var_dump($data);