API pentru Name is not set on server
JSON pentru programe, site-uri și altele
text
json
{
"response": {
"steam_id": null,
"domain": null,
"id": 9380045,
"ip": null,
"port": null,
"query": null,
"project_id": null,
"color": 0,
"city": null,
"description": "[{\"id\":\"v5JDt9j7fG\",\"type\":\"paragraph\",\"data\":{\"text\":\"**Flying Scoutsman** | **Перелетные снайперы** *и не только*\\nВпервые в cs2, я сделал данный сервер тк очень люблю этот режим, а ждать пока valve решат вернуть его можно вечность.\"}},{\"id\":\"bjJzl7JMOQ\",\"type\":\"paragraph\",\"data\":{\"text\":\"**В канале розыгрыш на 30 подписчиков)**\"}},{\"id\":\"b4-D4EePVN\",\"type\":\"paragraph\",\"data\":{\"text\":\"https://t.me/cs2norules\"}}]",
"game": 730,
"owner": 120374,
"boosts": 1,
"last_offline": 1754065480,
"last_online": 1751056820,
"icon": null,
"name": "Name is not set on server",
"connect": null,
"request": null,
"map": "ar_dizzy",
"gamemode": "Counter-Strike 2",
"version": null,
"numplayers": 0,
"maxplayers": 32,
"bots": 0,
"secured": false,
"private": false,
"country": "RU",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1747860571,
"last_update": 1754065480,
"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": 15626,
"language": "ru",
"parked": true,
"app": {
"id": 2,
"steam_id": 730,
"name": "Counter-Strike 2",
"url": "counter-strike-2"
},
"server_owner": {
"username": "noRules",
"avatar": "1c6304cd-8e26-4be8-b9b3-65bf55508a57.jpg"
},
"mods": [],
"disabled_modules": []
}
}Exemple de cod
php
<?php
$json = file_get_contents("https://api.gamemonitoring.ro/servers/9380045");
$data = json_decode($json, true);
var_dump($data);