API для 半条命3
JSON для программ, сайтов и прочего
text
json
{
"response": {
"add_date": 1789481647,
"app": {
"id": 1611062,
"name": "Abiotic Factor",
"steam_id": 427410,
"url": "abiotic-factor"
},
"color": 0,
"connect": "43.226.60.233:19020",
"country": "CN",
"domain": null,
"game": 427410,
"hide_address": false,
"hide_query": false,
"icon": null,
"id": 16462107,
"ip": "43.226.60.233",
"language": "zh",
"last_update": 1794662115,
"map": "EndGame",
"maxplayers": 8,
"name": "半条命3",
"numplayers": 0,
"official": null,
"points": 30,
"port": 19020,
"private": true,
"project_id": null,
"pve": null,
"pvp": null,
"query": 19021,
"request": "43.226.60.233:19021",
"secured": false,
"status": true,
"steam_id": "90297415744906259",
"version": "1.0.0.6",
"votes": 0,
"wipe": null,
"ban_reason": null,
"banned": false,
"boosts": 1,
"bots": 0,
"city": "Нанкин",
"description": null,
"disabled_modules": [],
"gamemode": "Abiotic Factor",
"hidden": false,
"last_offline": 1794603298,
"last_online": 1794662115,
"list_hidden": false,
"map_url": null,
"mods": [],
"next_wipe": null,
"parked": false,
"position_game": 1012,
"wipe_period": null,
"SN_i": "1",
"SN0_s": "3",
"P2PADDR": "90297415744906259",
"P2PPORT": "19020",
"CONMETHOD": "P2P",
"GamePort_i": "19020",
"Hardcore_b": "false",
"OWNINGNAME": "半条命3",
"bHasMods_b": "false",
"listentype": "d",
"Dedicated_b": "true",
"ShortCode_s": "U9WD0",
"environment": "w",
"MaxPlayers_i": "8",
"SESSIONFLAGS": "43",
"a2s_protocol": 17,
"USESPRESENCE_b": "false",
"CUSTOMJOININFO_s": "c109046612204056ae564a7446d37b0d",
"players_complete": true,
"ModifiedRuleset_i": "2",
"AllowLocalOnlyMods_b": "true"
}
}Примеры кода
php
<?php
$json = file_get_contents("https://api.gamemonitoring.ru/servers/16462107");
$data = json_decode($json, true);
var_dump($data);