gettrack

[insert_php]

$tmstp = urldecode( $_GET[“timestamp”] );

$datetime = DateTime::createFromFormat(“Y-m-d H:i:s”, $tmstp);
$occurred = $datetime->getTimestamp();
$res1 = str_pad($occurred, 11, “0”);
$res2 = str_pad($res1, 12, “0”);
$result = str_pad($res2, 13, “0”);

$latt = urldecode( $_GET[“lat”] );
$lont = urldecode( $_GET[“lon”] );
$alti = urldecode( $_GET[“altitude”] );
$spd = urldecode( $_GET[“speed”] );
$bet = urldecode( $_GET[“bearing”] );
$uname = urldecode( $_GET[“username”] );
$keyt = urldecode( $_GET[“key”] );
$tp = “&timestamp=”;

$url = ‘https://knockgps.com/techsodes/?’;
$myvars = $url . ‘lat=’ . $latt . ‘&lon=’ . $lont . ‘&’ . ‘%20’ . ‘timestamp=’ . $result . ‘&altitude=’ . $alti. ‘&speed=’ . $spd. ‘&bearing=’ . $bet. ‘&username=’ . $uname . ‘&key=’ . $keyt;

$ch = curl_init($myvars);

$response = curl_exec( $ch );
echo $response;
[/insert_php]