This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// example call: ValidateLCDepartures.php station=0088xxxxx (where 0088xxxxx is a station ID) | |
parse_str(implode('&', array_slice($argv, 1)), $_GET); | |
$station = $_GET['station']; | |
// Get current datetime | |
$datetime = new DateTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wenn von Vorgängerversion verschieden werden alle daten gelöscht. | |
DATA_VERSION=4 | |
# Server | |
BASE_QUERY=demo.hafas.de/bin/pub/std40 | |
# Per GET zu schickende URL-Parameter | |
GETPARAMS=ld,checksum,mic,mac | |
# Suchmethode |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Stations": [ | |
{ | |
"Code": "ATAAB", | |
"Name": "Wien Mitte (At)", | |
"Enabled": "1", | |
"Synoniem": "Vienna", | |
"Query": "Wien Mitte (At) Vienna" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST http://www.belgianrail.be/jp/sncb-nmbs-routeplanner/mgate.exe HTTP/1.1 | |
User-Agent: SNCB/302240 (Android_8.0.0) Dalvik/2.1.0 (Linux; U; Android 8.0.0; HTC 10 Build/OPR1.170623.027) | |
Content-Type: application/json;charset=UTF-8 | |
Host: www.belgianrail.be | |
Connection: Keep-Alive | |
Accept-Encoding: gzip | |
Content-Length: 650 | |
{"auth":{"aid":"sncb-mobi","type":"AID"},"client":{"id":"SNCB","name":"NMBS","os":"Android 8.0.0","type":"AND","ua":"SNCB/302240 (Android_8.0.0) Dalvik/2.1.0 (Linux; U; Android 8.0.0; HTC 10 Build/OPR1.170623.027)","v":302240},"formatted":false,"lang":"nld","svcReqL":[{"cfg":{"polyEnc":"GPA"},"meth":"StationBoard","req":{"date":"20180210","getPasslist":false,"getTrainComposition":false,"jnyFltrL":[{"mode":"BIT","type":"PROD","value":"11101111111111"}],"maxJny":50,"stbLoc":{"lid":"A=1@O=Brussel-Zuid@X=4336531@Y=50835707@U=80@L=008814001@B=1@p=1510534428@n=ac.1=GA@","name":"Brussel-Zuid","type":"S"},"time":"192234","type":"ARR"}}],"ver":"1.11"} | |
HTTP/1.1 200 OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function file_put_contents_rec($file, $data) | |
{ | |
$file = ltrim($file, '/'); | |
$folder = substr($file, 0, -1 * strlen(basename($file))); | |
if (!is_dir($folder)) { | |
// dir doesn't exist, make it | |
mkdir($folder, 0777, true); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const GTFS_PATH = '/tmp/gtfs/'; | |
const TARGET_DIR = './splitGtfs/'; | |
@mkdir(GTFS_PATH); | |
@mkdir(TARGET_DIR); | |
if (! file_exists(GTFS_PATH . "sweden.zip")){ | |
echo 'getting GTFS...'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"storage": "/var/www/se.lc.bertmarcelis.be/storage", | |
"datasets":[ | |
{ | |
"companyName": "ul", | |
"downloadUrl": "./splitGtfs/ul.zip", | |
"downloadOnLaunch": true, | |
"updatePeriod": "0 0 0 0 1 *", | |
"fragmentSize": 500000, | |
"realTimeData": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ćreate a stations list, agencies list, stations list per agency, stops files from GTFS. | |
* Due to a lack of time this doesn't output 100% valid linked data (yet), but it's good enough for now | |
* | |
* Free to use, adapt, modify, redistribute however you want at your own responsibility. | |
* | |
* Requirements: | |
* php-zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!Doctype html> | |
<html prefix="dct: http://purl.org/dc/terms/ | |
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# | |
foaf: http://xmlns.com/foaf/0.1/ | |
og: http://ogp.me/ns#"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>LC2Heat</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Linked Connections Trains</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<style> | |
tr:first-of-type { | |
background-color: #c7292933 !important; |
OlderNewer