summaryrefslogtreecommitdiffstats
path: root/ajax/maps.ajax.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-09 14:25:06 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-09 14:25:06 -0800
commite3b999dc0520df1cc7ed0a4f92080368e9728cb9 (patch)
treeeba7cffe6db0e9e1c730115e580f24cbd13c7664 /ajax/maps.ajax.php
parente147e44088e8bc76fac2a3b92b32b76f9867280d (diff)
downloadpathery-e3b999dc0520df1cc7ed0a4f92080368e9728cb9.tar.xz
Map URL rewrite .com/map/ID - Note this has domain name in it...
Diffstat (limited to 'ajax/maps.ajax.php')
-rw-r--r--ajax/maps.ajax.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/ajax/maps.ajax.php b/ajax/maps.ajax.php
new file mode 100644
index 0000000..d2ae750
--- /dev/null
+++ b/ajax/maps.ajax.php
@@ -0,0 +1,20 @@
+<?
+
+//CACHE HEADERS
+include('../includes/mapclass.php');
+include('../includes/maps.php');
+
+//RETURN MAP w/ CACHE HEADERS
+$mapID = $_GET['mapid'] * 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');
+echo json_encode($map);
+
+?> \ No newline at end of file