SetFlagFile("./pgs/country.csv"); $Reflector->SetPIDFile($Service['PIDFile']); $Reflector->SetXMLFile($Service['XMLFile']); $Reflector->LoadXML(); if ($CallingHome['Active']) { $CallHomeNow = false; $LastSync = 0; $Hash = ""; if (!file_exists($CallingHome['HashFile'])) { $Ressource = fopen($CallingHome['HashFile'], "w+"); if ($Ressource) { $Hash = CreateCode(16); @fwrite($Ressource, "'); @fflush($Ressource); @fclose($Ressource); @chmod($HashFile, 0777); } } else { require_once($CallingHome['HashFile']); } if (@file_exists($CallingHome['LastCallHomefile'])) { if (@is_readable($CallingHome['LastCallHomefile'])) { $tmp = @file($CallingHome['LastCallHomefile']); if (isset($tmp[0])) { $LastSync = $tmp[0]; } unset($tmp); } } if ($LastSync < (time() - $CallingHome['PushDelay'])) { $CallHomeNow = true; $Ressource = @fopen($CallingHome['LastCallHomefile'], "w+"); if ($Ressource) { @fwrite($Ressource, time()); @fflush($Ressource); @fclose($Ressource); @chmod($HashFile, 0777); } } if ($CallHomeNow || isset($_GET['callhome'])) { $Reflector->SetCallingHome($CallingHome, $Hash); $Reflector->ReadInterlinkFile(); $Reflector->PrepareInterlinkXML(); $Reflector->PrepareReflectorXML(); $Reflector->CallHome(); } } else { $Hash = ""; } ?>