Improved www.ttss.krakow.pl
Jacek Kowalski
2017-05-14 a252b0a80bd0f71f567520e566c4429fb8ecd272
commit | author | age
ced309 1 <?php
JK 2 if(php_sapi_name() !== 'cli') die();
3
547b8d 4 $json = file_get_contents('http://www.ttss.krakow.pl/internetservice/geoserviceDispatcher/services/stopinfo/stops?left=-648000000&bottom=-324000000&right=648000000&top=324000000');
JK 5 $elements = json_decode($json, 1);
6 foreach($elements['stops'] as $element) {
e61357 7     if($element['category'] == 'other') continue;
547b8d 8     $stops[$element['shortName']] = $element['name'];
ced309 9 }
JK 10
11 asort($stops);
12 var_export($stops);