Location: PHPKode > scripts > PHP GPS Locator > php-gps-locator/retriever.php
<?

include ("inc/config.php"); 
require_once("cls.nmeaParser.php");

$nmea=new nmeaParser();
$nmea->activeSession();

?>
<html>
<head>
<meta http-equiv="refresh" content="<?=$config['refresh']?>;URL=<?=$_SERVER['PHP_SELF']?>">
<link href="css/_stile.css" rel="stylesheet" type="text/css" />
<? include ("inc/http_headers.php"); ?>
</head>
<body>
<?
$coord=$nmea->extractLastRecord();
$scan=$nmea->scanPOI($coord['lat'],$coord['lon']);
$amb=$nmea->checkPoint($scan);

$idpoi=$amb['id'];
$linkpoi=$amb['link'];

if(($linkpoi=="")||(empty($linkpoi))) $linkpoi="default.php";

echo "<br/>LINK $linkpoi IDPOI $idpoi SESSIONE IDPOI ".$_SESSION["poi_id"];

if(($idpoi!=$_SESSION["poi_id"])||($_SESSION['ok']==0)){
	echo "<script language=\"JavaScript\">top.content.location='".$config['siteurl']."poi/$linkpoi';</script>";
	$_SESSION["poi_id"] = $idpoi;
	$_SESSION["ok"]=1;
}

$nmea->closeDB();
?>
</body>
</html>
Return current item: PHP GPS Locator