<?php
$str = '{
"error":"false",
"response":[
{
"id":1,
"game":"ETS2",
"ip":"37.187.170.151",
"port":42860,
"name":"Europe 1",
"shortname":"EU #1",
"online":true,
"players":738,
"maxplayers":2300,
"speedlimiter":1
},
{
"id":3,
"game":"ETS2",
"ip":"191.101.3.39",
"port":42860,
"name":"United States",
"shortname":"US 1",
"online":true,
"players":9,
"maxplayers":1000,
"speedlimiter":1
},
{
"id":4,
"game":"ETS2",
"ip":"37.187.170.151",
"port":42880,
"name":"Europe 2",
"shortname":"EU 2",
"online":true,
"players":1445,
"maxplayers":2300,
"speedlimiter":0
}
]
}';
$json = json_decode($str, true);
echo $json['response'][0]['id']."<br>";
echo $json['response'][1]['id'];
?>