0) $configs[$key] = $value; } } $progname = basename($_SERVER['SCRIPT_FILENAME'],".php"); $rev="20141101"; $MYCALL=strtoupper($callsign); // Check if the config file exists if (file_exists('/etc/pistar-css.ini')) { // Use the values from the file $piStarCssFile = '/etc/pistar-css.ini'; if (fopen($piStarCssFile,'r')) { $piStarCss = parse_ini_file($piStarCssFile, true); } // Set the Values from the config file if (isset($piStarCss['Lookup']['Service'])) { $callsignLookupSvc = $piStarCss['Lookup']['Service']; } // Lookup Service "QRZ" or "RadioID" else { $callsignLookupSvc = "RadioID"; } // Set the default if its missing // Set the default if its missing } else { // Default values $callsignLookupSvc = "RadioID"; } // Safety net if (($callsignLookupSvc != "RadioID") && ($callsignLookupSvc != "QRZ")) { $callsignLookupSvc = "RadioID"; } // Setup the URL(s) if ($callsignLookupSvc == "RadioID") { $callsignLookupUrl = "https://database.radioid.net/database/view?callsign="; } if ($callsignLookupSvc == "QRZ") { $callsignLookupUrl = "https://www.qrz.com/db/"; } ?> /tmp/worked.log) 2>&1 &'); $ci = 0; if ($WorkedLog = fopen("/tmp/worked.log",'r')) { while ($linkLine = fgets($WorkedLog)) { if(preg_match_all('/^(.{19}).*My: (.*).*Your: (.*).*Rpt1: (.*).*Rpt2: (.*).*Flags: (.*)$/',$linkLine,$linx) > 0){ $ci++; if($ci > 1) { $ci = 0; } $QSODate = date("d-M-Y H:i:s", strtotime(substr($linx[1][0],0,19))); // Same normalisation pattern as dstarrepeater/last_herd.php — // see the note in that file for the rationale. $myCallRaw = str_replace(' ', '', substr($linx[2][0],0,8)); $myCallHtml = htmlspecialchars($myCallRaw, ENT_QUOTES, 'UTF-8'); $myCallLink = strtok(substr($linx[2][0],0,8), " "); $myCallLinkUrl = rawurlencode((string)$myCallLink); $myIdHtml = htmlspecialchars(str_replace(' ', '', substr($linx[2][0],9,4)), ENT_QUOTES, 'UTF-8'); $yourCallHtml = str_replace(' ', ' ', htmlspecialchars(substr($linx[3][0],0,8), ENT_QUOTES, 'UTF-8')); $rpt1Html = str_replace(' ', ' ', htmlspecialchars(substr($linx[4][0],0,8), ENT_QUOTES, 'UTF-8')); $rpt2Html = str_replace(' ', ' ', htmlspecialchars(substr($linx[5][0],0,8), ENT_QUOTES, 'UTF-8')); $utc_time = $QSODate; $utc_tz = new DateTimeZone('UTC'); $local_tz = new DateTimeZone(date_default_timezone_get ()); $dt = new DateTime($utc_time, $utc_tz); $dt->setTimeZone($local_tz); $local_time = $dt->format('H:i:s M jS'); print ""; print ""; print ""; } else { print "
(dPRS)
"; } print ""; print ""; print ""; print "\n"; } } fclose($WorkedLog); } ?>
() RPT 1 RPT 2
$local_time
$myCallHtml"; if($myIdHtml !== '') { print "/$myIdHtml
(dPRS)
$yourCallHtml$rpt1Html$rpt2Html