array('timeout' => 2, 'header' => 'User-Agent: Pi-Star Dashboard for '.$dmrID) )); // Add Timout and User Agent to include DMRID $json_data = file_get_contents("http://tgif.network:5040/api/sessions", false, $jsonContext); $json = json_decode($json_data, false); // Work out what session number we are using foreach($json as $key => $jsons) { foreach($jsons as $key => $value) { if ($json->sessions[$key]->repeater_id == $dmrID) { $session_nr = $key; } } } // Pull the information from JSON if (isset($session_nr)) { $repeaterid = $json->sessions[$session_nr]->repeater_id; if ($json->sessions[$session_nr]->tg0 == "4000") { $slot1tg = "None"; } else { $slot1tg = "TG".$json->sessions[$session_nr]->tg0; } if ($json->sessions[$session_nr]->tg == "4000") { $slot2tg = "None"; } else { $slot2tg = "TG".$json->sessions[$session_nr]->tg; } echo 'Active TGIF Connections '."\n"; echo ' '."\n"; echo ' '; echo ''; echo ''; echo ''; echo ''."\n"; echo '
DMR MasterConnected Master Repeater IDThe ID for this Repeater/Hotspot Slot1 TGTG linked to Slot 1 Slot2 TGTG linked to Slot 2
tgif.network'.$repeaterid.''.$slot1tg.''.$slot2tg.'
'."\n"; echo '
'."\n"; } } ?>