avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame] | 1 | <?php |
2 | require_once(__DIR__."/../core.php"); | ||||
3 | |||||
avm99963 | b65405c | 2020-01-27 03:31:40 +0100 | [diff] [blame^] | 4 | if (php_sapi_name() != "cli") { |
5 | security::notFound(); | ||||
6 | exit(); | ||||
7 | } | ||||
8 | |||||
avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame] | 9 | echo "[info] Getting gtfs.zip file...\n"; |
10 | $temp = tmpfile(); | ||||
11 | tmbApi::request("static/datasets/gtfs.zip", $temp); | ||||
12 | |||||
13 | echo "\n"; | ||||
14 | |||||
15 | gtfsHandler::createDatabase(stream_get_meta_data($temp)['uri']); |