getLocation(); $ctrycode = $cloc['country_code']; if (strtoupper($incd) == strtoupper($ctrycode)) { $remote_dt = new DateTime("now", $tz); $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600; $newp=$retd . $nearname[$best1] . "/" . $remote_dt->format('Y-m-d_H:i:s') . " (GMT" . $offset . ")"; $huhs=explode(" (GMT" . $offset . ")", $retv); if (sizeof($huhs) == 2) { if (explode("/", $newp)[0] != explode("/", explode(",", $huhs[0])[-1 + sizeof(explode(",", $huhs[0]))])[0]) { $huhs=explode("youwillneverfindthis", $retv); } } if (($sofar + strlen(urlencode(($retv . $newp)))) < 950 && $jj < 10 && sizeof($huhs) == 1) { $retv.=$newp; $retd=","; $jj++; } } } catch (Exception $exc) { } } return $retv; } if (isset($_GET['gmc']) && isset($_GET['viac'])) { $contw=file_get_contents(str_replace('https:','http:',urldecode($_GET['viac']))); if (strpos($contw, ">Coordinates:") !== false) { $bits=explode(">Coordinates:", $contw); if (strpos($bits[1], "params=") !== false) { $postbits=explode("params=", $bits[1]); $nextbits=explode("_", $postbits[1]); $latis=$nextbits[0]; // 16_10_N_107_50_E_ if ($nextbits[2] == "N" || $nextbits[2] == "S") { $latis+=($nextbits[1] / 60.0); if ($nextbits[2] == "S") $latis=-$latis; $longis=$nextbits[3]; if ($nextbits[5] == "E" || $nextbits[5] == "W") { $longis+=($nextbits[4] / 60.0); if ($nextbits[5] == "W") $longis=-$longis; } else { if ($nextbits[4] == "W") $longis=-$longis; } } else { if ($nextbits[1] == "S") $latis=-$latis; $longis=$nextbits[2]; if ($nextbits[3] == "W") $longis=-$longis; } // 27.417_N_90.435_E_ $urlis=urldecode($_GET['gmc']); if (strpos($urlis, ',,') !== false) { $urlis=str_replace(",,", urlencode($latis . "," . $longis . ","), $urlis); } else { $urlis=str_replace(urlencode(",,"), urlencode($latis . "," . $longis . ","), $urlis); } if (isset($_GET['ccode'])) { $urlis=str_replace("&onclick=", "%20" . urlencode(inctycodecheck(urldecode($_GET['ccode']), (strlen($urlis) + 3))) . "&onclick=", $urlis); } if (isset($_SERVER['HTTPS'])) { if ($_SERVER['HTTPS'] == "on") { header("Location: https:" . $urlis); } else { header("Location: http:" . $urlis); } } else { header("Location: http:" . $urlis); } exit; } } exit; } ?>