summaryrefslogtreecommitdiffstats
path: root/ajax/maps.ajax.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-14 00:42:29 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-14 00:42:29 -0800
commitf65cf9406397ac688ec4060ba070e172af0cd90b (patch)
tree391b668b47b1237711b5424722d0be07fb4f9509 /ajax/maps.ajax.php
parenta5d4ffe96373a24c398a47165e7079e30735467f (diff)
downloadpathery-f65cf9406397ac688ec4060ba070e172af0cd90b.tar.xz
Lots'n Lots of work on the scoreboard...
Diffstat (limited to 'ajax/maps.ajax.php')
-rw-r--r--ajax/maps.ajax.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/ajax/maps.ajax.php b/ajax/maps.ajax.php
index d2ae750..a5d72f2 100644
--- a/ajax/maps.ajax.php
+++ b/ajax/maps.ajax.php
@@ -1,20 +1,22 @@
<?
+ob_start("ob_gzhandler");
//CACHE HEADERS
include('../includes/mapclass.php');
include('../includes/maps.php');
//RETURN MAP w/ CACHE HEADERS
-$mapID = $_GET['mapid'] * 1;
+$tmp = explode(".", $_GET['mapid']);
+$mapID = $tmp[0] * 1;
if (!is_int($mapID)) exit;
$map = new map(getMapCode($mapID), $mapID);
-// 62 days
-// $expires = 62*24*60*60
-// header("Pragma: public");
-// header("Cache-Control: maxage=".$expires);
-// header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
+//62 days
+$expires = 62*24*60*60;
+header("Cache-Control: public, maxage=".$expires);
+header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
+header("Content-type: text/javascript");
echo json_encode($map);
?> \ No newline at end of file