|
|
|
|
@ -2,31 +2,31 @@
|
|
|
|
|
|
|
|
|
|
class xReflector {
|
|
|
|
|
|
|
|
|
|
public $Nodes = null;
|
|
|
|
|
public $Stations = null;
|
|
|
|
|
public $Peers = null;
|
|
|
|
|
private $Flagarray = null;
|
|
|
|
|
private $Flagarray_DXCC = null;
|
|
|
|
|
private $Flagfile = null;
|
|
|
|
|
private $CallingHomeActive = null;
|
|
|
|
|
private $CallingHomeHash = null;
|
|
|
|
|
private $CallingHomeDashboardURL = null;
|
|
|
|
|
private $CallingHomeServerURL = null;
|
|
|
|
|
private $ReflectorName = null;
|
|
|
|
|
private $ServiceUptime = null;
|
|
|
|
|
private $ProcessIDFile = null;
|
|
|
|
|
private $XMLContent = null;
|
|
|
|
|
private $XMLFile = null;
|
|
|
|
|
private $ServiceName = null;
|
|
|
|
|
private $Version = null;
|
|
|
|
|
private $CallingHomeCountry = null;
|
|
|
|
|
private $CallingHomeComment = null;
|
|
|
|
|
private $CallingHomeOverrideIP = null;
|
|
|
|
|
private $Transferinterlink = null;
|
|
|
|
|
private $Interlinkfile = null;
|
|
|
|
|
public $Nodes = null;
|
|
|
|
|
public $Stations = null;
|
|
|
|
|
public $Peers = null;
|
|
|
|
|
private $Flagarray = null;
|
|
|
|
|
private $Flagarray_DXCC = null;
|
|
|
|
|
private $Flagfile = null;
|
|
|
|
|
private $CallingHomeActive = null;
|
|
|
|
|
private $CallingHomeHash = null;
|
|
|
|
|
private $CallingHomeDashboardURL = null;
|
|
|
|
|
private $CallingHomeServerURL = null;
|
|
|
|
|
private $ReflectorName = null;
|
|
|
|
|
private $ServiceUptime = null;
|
|
|
|
|
private $ProcessIDFile = null;
|
|
|
|
|
private $XMLContent = null;
|
|
|
|
|
private $XMLFile = null;
|
|
|
|
|
private $ServiceName = null;
|
|
|
|
|
private $Version = null;
|
|
|
|
|
private $CallingHomeCountry = null;
|
|
|
|
|
private $CallingHomeComment = null;
|
|
|
|
|
private $CallingHomeOverrideIP = null;
|
|
|
|
|
private $Transferinterlink = null;
|
|
|
|
|
private $Interlinkfile = null;
|
|
|
|
|
public $Interlinks = null;
|
|
|
|
|
private $InterlinkXML = null;
|
|
|
|
|
private $ReflectorXML = null;
|
|
|
|
|
private $InterlinkXML = null;
|
|
|
|
|
private $ReflectorXML = null;
|
|
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
|
$this->Nodes = array();
|
|
|
|
|
@ -42,17 +42,17 @@ class xReflector {
|
|
|
|
|
$this->XMLContent = fread($handle, filesize($this->XMLFile));
|
|
|
|
|
fclose($handle);
|
|
|
|
|
|
|
|
|
|
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XRF")+4, 3);
|
|
|
|
|
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
|
|
|
|
|
if (!is_numeric($this->ServiceName)) {
|
|
|
|
|
$this->ServiceName = null;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->ReflectorName = "XRF".$this->ServiceName;
|
|
|
|
|
$this->ReflectorName = "XLX".$this->ServiceName;
|
|
|
|
|
|
|
|
|
|
$LinkedPeersName = "XRF".$this->ServiceName." linked peers";
|
|
|
|
|
$LinkedNodesName = "XRF".$this->ServiceName." linked nodes";
|
|
|
|
|
$LinkedUsersName = "XRF".$this->ServiceName." heard users";
|
|
|
|
|
$LinkedPeersName = "XLX".$this->ServiceName." linked peers";
|
|
|
|
|
$LinkedNodesName = "XLX".$this->ServiceName." linked nodes";
|
|
|
|
|
$LinkedUsersName = "XLX".$this->ServiceName." heard users";
|
|
|
|
|
|
|
|
|
|
$XML = new ParseXML();
|
|
|
|
|
|
|
|
|
|
@ -239,7 +239,12 @@ class xReflector {
|
|
|
|
|
$i = 0;
|
|
|
|
|
while ($i < $this->NodeCount()) {
|
|
|
|
|
if ($this->Nodes[$i]->GetRandomID() == $RandomId) {
|
|
|
|
|
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
|
|
|
|
|
if (trim($this->Nodes[$i]->GetSuffix()) == "") {
|
|
|
|
|
return $this->Nodes[$i]->GetCallSign();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
|
|
|
|
|