mirror of https://github.com/nostar/urfd.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
715 B
24 lines
715 B
<?php
|
|
|
|
/*** Add links to payload ***/
|
|
for ($i=0;$i<$Reflector->NodeCount();$i++) {
|
|
|
|
// craft payload array
|
|
$payload[$i] = array(
|
|
'callsign' => $Reflector->Nodes[$i]->GetCallSign() . ' ' . $Reflector->Nodes[$i]->GetSuffix(),
|
|
'ip' => $Reflector->Nodes[$i]->GetIP(),
|
|
'linkedmodule' => $Reflector->Nodes[$i]->GetLinkedModule(),
|
|
'protocol' => $Reflector->Nodes[$i]->GetProtocol(),
|
|
'connecttime' => date('Y-m-d\TH:i:sp', $Reflector->Nodes[$i]->GetConnectTime()),
|
|
'lastheardtime' => date('Y-m-d\TH:i:sp', $Reflector->Nodes[$i]->GetLastHeardTime())
|
|
);
|
|
|
|
}
|
|
|
|
|
|
// json encode payload array
|
|
$records = json_encode($payload);
|
|
|
|
echo $records;
|
|
|
|
?>
|