forked from kolesar-andras/turistautak-osm-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
51 lines (38 loc) · 860 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* turistautak.hu osm api
*
* @author Kolesár András <kolesar@turistautak.hu>
* @since 2014.06.09
*
*/
$base = '/api/0.6/';
$url = parse_url($_SERVER['REQUEST_URI']);
switch ($url['path']) {
case '/api/capabilities':
case $base . 'capabilities':
require_once('capabilities.php');
break;
case $base . 'changesets':
require_once('changesets.php');
break;
case $base . 'map':
require_once('map.php');
break;
case $base . 'map-dev':
require_once('map-dev.php');
break;
case $base . 'notes':
require_once('notes.php');
break;
case $base . 'trackpoints':
require_once('trackpoints.php');
break;
case '/api/':
require_once('api.php');
break;
default:
header('HTTP/1.0 404 Not Found');
echo '404 Not Found';
// file_put_contents('log', $_SERVER['REQUEST_URI'] . "\n", FILE_APPEND);
}