Compare commits
No commits in common. "a630515ceac622f8434c7d9af4961140d6c8eb1b" and "807c0b5a9b289537d08473239a4e59529a08f806" have entirely different histories.
a630515cea
...
807c0b5a9b
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
include("./php/LDBWS.php");
|
include("./php/LDBWS.php");
|
||||||
include("/srv/keys/athena/apiKeys.php");
|
include("/srv/keys/athena/apiKeys.php");
|
||||||
$response = GetDepartureBoard(10,'BRI');
|
$OpenLDBWS = new Ldb($ldbKey,$trace=true);
|
||||||
|
$response = $OpenLDBWS->GetArrivalDepartureBoard(10,BRI);
|
||||||
echo $response;
|
echo $response;
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
require './php/openLDBSVWS.php';
|
||||||
|
require '/srv/php-keys/athena/gitea.php';
|
||||||
|
date_default_timezone_set("Europe/London");
|
||||||
|
$OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
|
||||||
|
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
||||||
|
header("Content-Type: text/plain");
|
||||||
|
print_r($response);
|
||||||
|
?>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>TESTING</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
require("OpenLDBWS.php");
|
||||||
|
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
|
||||||
|
$response = $OpenLDBWS->GetDepartureBoard(10,"GTW");
|
||||||
|
$template["header"] = "
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Time</th>
|
||||||
|
<th>Destination</th>
|
||||||
|
<th>Platform</th>
|
||||||
|
<th>Expected</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
";
|
||||||
|
$template["row"] = "
|
||||||
|
<tr>
|
||||||
|
<td>{std}</td>
|
||||||
|
<td>{destination}</td>
|
||||||
|
<td>{platform}</td>
|
||||||
|
<td>{etd}</td>
|
||||||
|
</tr>
|
||||||
|
";
|
||||||
|
$template["footer"] = "
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
";
|
||||||
|
if (isset($response->GetStationBoardResult->trainServices->service))
|
||||||
|
{
|
||||||
|
print $template["header"];
|
||||||
|
foreach($response->GetStationBoardResult->trainServices->service as $service)
|
||||||
|
{
|
||||||
|
$row = $template["row"];
|
||||||
|
$destinations = array();
|
||||||
|
foreach($service->destination->location as $location)
|
||||||
|
{
|
||||||
|
$destinations[] = $location->locationName;
|
||||||
|
}
|
||||||
|
$row = str_replace("{std}",$service->std,$row);
|
||||||
|
$row = str_replace("{destination}",implode(" and ",$destinations),$row);
|
||||||
|
$row = str_replace("{platform}",(isset($service->platform)?$service->platform:" "),$row);
|
||||||
|
$row = str_replace("{etd}",$service->etd,$row);
|
||||||
|
print $row;
|
||||||
|
}
|
||||||
|
print $template["footer"];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>TESTING</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
require './php/openLDBWS.php';
|
||||||
|
require './php/submitIssue.php';
|
||||||
|
require '/srv/keys/athena/apiKeys.php';
|
||||||
|
|
||||||
|
echo cleanInput($_SERVER['QUERY_STRING']);
|
||||||
|
|
||||||
|
date_default_timezone_set("Europe/London");
|
||||||
|
$OpenLDBWS = new OpenLDBWS($ldbKey);
|
||||||
|
$response = $OpenLDBWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
||||||
|
$template["header"] = "
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Org.</th>
|
||||||
|
<th>Dest.</th>
|
||||||
|
<th>Plat.</th>
|
||||||
|
<th>Sch</th>
|
||||||
|
<th>Exp</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
";
|
||||||
|
$template["row"] = "
|
||||||
|
<tr>
|
||||||
|
<td>{id}</td>
|
||||||
|
<td>{org}</td>
|
||||||
|
<td>{dest}</td>
|
||||||
|
<td>{plat}</td>
|
||||||
|
<td>{sch}</td>
|
||||||
|
<td>{act}</td>
|
||||||
|
</tr>
|
||||||
|
";
|
||||||
|
$template["footer"] = "
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
";
|
||||||
|
if (isset($response->GetBoardResult->trainServices->service))
|
||||||
|
{
|
||||||
|
print $template["header"];
|
||||||
|
foreach($response->GetBoardResult->trainServices->service as $service)
|
||||||
|
{
|
||||||
|
$row = $template["row"];
|
||||||
|
$destinations = array();
|
||||||
|
|
||||||
|
$row = str_replace("{id}",$service->trainid,$row);
|
||||||
|
$row = str_replace("{org}",$service->origin->location->tiploc,$row);
|
||||||
|
$row = str_replace("{dest}",$service->destination->location->tiploc,$row);
|
||||||
|
$row = str_replace("{plat}",$service->platform,$row);
|
||||||
|
$row = str_replace("{sch}",$servoce->std,$row);
|
||||||
|
$row = str_replace("{act}",$service->etd,$row);
|
||||||
|
print $row;
|
||||||
|
}
|
||||||
|
print $template["footer"];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,500 @@
|
||||||
|
stdClass Object
|
||||||
|
(
|
||||||
|
[GetBoardResult] => stdClass Object
|
||||||
|
(
|
||||||
|
[generatedAt] => 2022-11-05T21:47:01.9993579+00:00
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[stationManager] => Network Rail
|
||||||
|
[stationManagerCode] => RT
|
||||||
|
[isTruncated] => 1
|
||||||
|
[trainServices] => stdClass Object
|
||||||
|
(
|
||||||
|
[service] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051479
|
||||||
|
[uid] => F51479
|
||||||
|
[trainid] => 9U02
|
||||||
|
[rsid] => XR134200
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T21:48:00
|
||||||
|
[etd] => 2022-11-05T21:48:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[1] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057919346
|
||||||
|
[uid] => O19346
|
||||||
|
[trainid] => 1T91
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Great Western Railway
|
||||||
|
[operatorCode] => GW
|
||||||
|
[std] => 2022-11-05T21:55:00
|
||||||
|
[etd] => 2022-11-05T21:55:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => TD
|
||||||
|
[platform] => 7
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTON
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Heathrow Airport T5
|
||||||
|
[crs] => HWV
|
||||||
|
[tiploc] => HTRWTM5
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[2] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051484
|
||||||
|
[uid] => F51484
|
||||||
|
[trainid] => 9U04
|
||||||
|
[rsid] => XR134700
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T21:58:00
|
||||||
|
[etd] => 2022-11-05T21:58:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[3] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051488
|
||||||
|
[uid] => F51488
|
||||||
|
[trainid] => 9U06
|
||||||
|
[rsid] => XR135100
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T22:08:00
|
||||||
|
[etd] => 2022-11-05T22:08:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[4] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057919347
|
||||||
|
[uid] => O19347
|
||||||
|
[trainid] => 1T92
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Great Western Railway
|
||||||
|
[operatorCode] => GW
|
||||||
|
[std] => 2022-11-05T22:10:00
|
||||||
|
[etd] => 2022-11-05T22:10:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => TD
|
||||||
|
[platform] => 6
|
||||||
|
[platformIsHidden] => 1
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTON
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Heathrow Airport T5
|
||||||
|
[crs] => HWV
|
||||||
|
[tiploc] => HTRWTM5
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[5] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051492
|
||||||
|
[uid] => F51492
|
||||||
|
[trainid] => 9U08
|
||||||
|
[rsid] => XR135500
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T22:18:00
|
||||||
|
[etd] => 2022-11-05T22:18:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[6] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057919350
|
||||||
|
[uid] => O19350
|
||||||
|
[trainid] => 1T93
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Great Western Railway
|
||||||
|
[operatorCode] => GW
|
||||||
|
[std] => 2022-11-05T22:25:00
|
||||||
|
[etd] => 2022-11-05T22:25:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => 7
|
||||||
|
[platformIsHidden] => 1
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTON
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Heathrow Airport T5
|
||||||
|
[crs] => HWV
|
||||||
|
[tiploc] => HTRWTM5
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[7] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051497
|
||||||
|
[uid] => F51497
|
||||||
|
[trainid] => 9U10
|
||||||
|
[rsid] => XR136000
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T22:28:00
|
||||||
|
[etd] => 2022-11-05T22:28:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[8] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057051502
|
||||||
|
[uid] => F51502
|
||||||
|
[trainid] => 9U12
|
||||||
|
[rsid] => XR136500
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Elizabeth Line
|
||||||
|
[operatorCode] => XR
|
||||||
|
[std] => 2022-11-05T22:38:00
|
||||||
|
[etd] => 2022-11-05T22:38:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => A
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTLL
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Abbey Wood
|
||||||
|
[crs] => ABW
|
||||||
|
[tiploc] => ABWDXR
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
[9] => stdClass Object
|
||||||
|
(
|
||||||
|
[rid] => 202211057919351
|
||||||
|
[uid] => O19351
|
||||||
|
[trainid] => 1T94
|
||||||
|
[sdd] => 2022-11-05
|
||||||
|
[operator] => Great Western Railway
|
||||||
|
[operatorCode] => GW
|
||||||
|
[std] => 2022-11-05T22:40:00
|
||||||
|
[etd] => 2022-11-05T22:40:00
|
||||||
|
[departureType] => Forecast
|
||||||
|
[departureSource] => Darwin
|
||||||
|
[platform] => 6
|
||||||
|
[platformIsHidden] => 1
|
||||||
|
[origin] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => London Paddington
|
||||||
|
[crs] => PAD
|
||||||
|
[tiploc] => PADTON
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[destination] => stdClass Object
|
||||||
|
(
|
||||||
|
[location] => Array
|
||||||
|
(
|
||||||
|
[0] => stdClass Object
|
||||||
|
(
|
||||||
|
[locationName] => Heathrow Airport T5
|
||||||
|
[crs] => HWV
|
||||||
|
[tiploc] => HTRWTM5
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
[category] => OO
|
||||||
|
[activities] => TB
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
phpinfo();
|
||||||
|
?>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
require('/srv/keys/athena/apiKeys.php');
|
||||||
|
$wsdl = 'http://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx';
|
||||||
|
|
||||||
|
$trace = true;
|
||||||
|
$exceptions = true;
|
||||||
|
|
||||||
|
$soapOptions = array("trace"=>$trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
|
||||||
|
$client = new SoapClient($wsdl, $soapOptions);
|
||||||
|
|
||||||
|
### BELOW THIS LINE NEEDS ADJUSTING TO NEW ENVIRONMENT -- USE SOAP FLATPAK TO FIND THE CURRENT URL FOR THE HEADER TYPE
|
||||||
|
## THE ACCESSTOKEN Var needs changinh to match what is in apiKeys.php
|
||||||
|
$soapVar = new SoapVar(array("ns2:TokenValue"=>$accessToken),SOAP_ENC_OBJECT);
|
||||||
|
|
||||||
|
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||||
|
|
||||||
|
$client->__setSoapHeaders($soapHeader);
|
||||||
|
|
||||||
|
|
||||||
|
### This is the function to call the API:
|
||||||
|
### ACCESSTOKEN VAR ALSO NEEDS CHANGING HERE
|
||||||
|
|
||||||
|
function call($method,$params)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$response = $client->$method($params);
|
||||||
|
}
|
||||||
|
catch(SoapFault $soapFault)
|
||||||
|
{
|
||||||
|
if ($this->trace)
|
||||||
|
{
|
||||||
|
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||||
|
$traceOutput["soapClientRequest"] = str_replace($accessToken,"",$client->__getLastRequest());
|
||||||
|
$traceOutput["soapClientResponse"] = $client->__getLastResponse();
|
||||||
|
print_r($traceOutput);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (isset($response)?$response:FALSE);
|
||||||
|
}
|
|
@ -0,0 +1,136 @@
|
||||||
|
<?php
|
||||||
|
class OpenLDBWS
|
||||||
|
{
|
||||||
|
private $soapClient = NULL;
|
||||||
|
|
||||||
|
private $accessToken;
|
||||||
|
|
||||||
|
private $trace;
|
||||||
|
|
||||||
|
function __construct($accessToken,$trace=FALSE)
|
||||||
|
{
|
||||||
|
$this->accessToken = $accessToken;
|
||||||
|
|
||||||
|
$this->trace = $trace;
|
||||||
|
|
||||||
|
$soapOptions = array("trace"=>$this->trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
|
||||||
|
if (extension_loaded("zlib")) $soapOptions["compression"] = SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP;
|
||||||
|
|
||||||
|
$this->soapClient = new SoapClient("http://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx",$soapOptions);
|
||||||
|
|
||||||
|
$soapVar = new SoapVar(array("ns2:TokenValue"=>$this->accessToken),SOAP_ENC_OBJECT);
|
||||||
|
|
||||||
|
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||||
|
|
||||||
|
$this->soapClient->__setSoapHeaders($soapHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function call($method,$params)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$response = $this->soapClient->$method($params);
|
||||||
|
}
|
||||||
|
catch(SoapFault $soapFault)
|
||||||
|
{
|
||||||
|
if ($this->trace)
|
||||||
|
{
|
||||||
|
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||||
|
$traceOutput["soapClientRequest"] = str_replace($this->accessToken,"",$this->soapClient->__getLastRequest());
|
||||||
|
$traceOutput["soapClientResponse"] = $this->soapClient->__getLastResponse();
|
||||||
|
print_r($traceOutput);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (isset($response)?$response:FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function StationBoard($method,$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow)
|
||||||
|
{
|
||||||
|
$params["numRows"] = $numRows;
|
||||||
|
|
||||||
|
$params["crs"] = $crs;
|
||||||
|
|
||||||
|
if ($filterCrs) $params["filterCrs"] = $filterCrs;
|
||||||
|
|
||||||
|
if ($filterType) $params["filterType"] = $filterType;
|
||||||
|
|
||||||
|
if ($timeOffset) $params["timeOffset"] = $timeOffset;
|
||||||
|
|
||||||
|
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||||
|
|
||||||
|
return $this->call($method,$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function DeparturesBoard($method,$crs,$filterList,$timeOffset,$timeWindow)
|
||||||
|
{
|
||||||
|
$params["crs"] = $crs;
|
||||||
|
|
||||||
|
$params["filterList"] = $filterList;
|
||||||
|
|
||||||
|
if ($timeOffset) $params["timeOffset"] = $timeOffset;
|
||||||
|
|
||||||
|
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||||
|
|
||||||
|
return $this->call($method,$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepartureBoard($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetDepartureBoard",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepBoardWithDetails($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetDepBoardWithDetails",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalBoard($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetArrivalBoard",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrBoardWithDetails($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetArrBoardWithDetails",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalDepartureBoard($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetArrivalDepartureBoard",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrDepBoardWithDetails($numRows,$crs,$filterCrs="",$filterType="",$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->StationBoard("GetArrDepBoardWithDetails",$numRows,$crs,$filterCrs,$filterType,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetNextDepartures($crs,$filterList,$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->DeparturesBoard("GetNextDepartures",$crs,$filterList,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetNextDeparturesWithDetails($crs,$filterList,$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->DeparturesBoard("GetNextDeparturesWithDetails",$crs,$filterList,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetFastestDepartures($crs,$filterList,$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->DeparturesBoard("GetFastestDepartures",$crs,$filterList,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetFastestDeparturesWithDetails($crs,$filterList,$timeOffset="",$timeWindow="")
|
||||||
|
{
|
||||||
|
return $this->DeparturesBoard("GetFastestDeparturesWithDetails",$crs,$filterList,$timeOffset,$timeWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetServiceDetails($serviceID)
|
||||||
|
{
|
||||||
|
$params["serviceID"] = $serviceID;
|
||||||
|
|
||||||
|
return $this->call("GetServiceDetails",$params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
|
@ -0,0 +1,325 @@
|
||||||
|
<?php
|
||||||
|
class OpenLDBSVWS
|
||||||
|
{
|
||||||
|
private $accessToken;
|
||||||
|
private $trace;
|
||||||
|
$wsdl = 'http://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx';
|
||||||
|
|
||||||
|
function __construct($accessToken,$trace=TRUE)
|
||||||
|
{
|
||||||
|
$this->accessToken = $accessToken;
|
||||||
|
|
||||||
|
$this->trace = $trace;
|
||||||
|
|
||||||
|
$soapOptions = array("trace"=>$this->trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
|
||||||
|
if (extension_loaded("zlib")) $soapOptions["compression"] = SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP;
|
||||||
|
|
||||||
|
$this->soapClient = new SoapClient("data:text/plain;base64,".base64_encode($this->wsdl),$soapOptions);
|
||||||
|
|
||||||
|
$soapVar = new SoapVar(array("ns2:TokenValue"=>$this->accessToken),SOAP_ENC_OBJECT);
|
||||||
|
|
||||||
|
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||||
|
|
||||||
|
$this->soapClient->__setSoapHeaders($soapHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function call($method,$params)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$response = $this->soapClient->$method($params);
|
||||||
|
}
|
||||||
|
catch(SoapFault $soapFault)
|
||||||
|
{
|
||||||
|
if ($this->trace)
|
||||||
|
{
|
||||||
|
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||||
|
|
||||||
|
$traceOutput["soapClientRequest"] = str_replace($this->accessToken,"",$this->soapClient->__getLastRequest());
|
||||||
|
|
||||||
|
$traceOutput["soapClientResponse"] = $this->soapClient->__getLastResponse();
|
||||||
|
|
||||||
|
print_r($traceOutput);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (isset($response)?$response:FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetBoardByCRS($method,$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices)
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($numRows) $params["numRows"] = $numRows;
|
||||||
|
|
||||||
|
if ($crs) $params["crs"] = $crs;
|
||||||
|
|
||||||
|
if ($time) $params["time"] = $time;
|
||||||
|
|
||||||
|
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||||
|
|
||||||
|
if ($filtercrs) $params["filtercrs"] = $filtercrs;
|
||||||
|
|
||||||
|
if ($filterType) $params["filterType"] = $filterType;
|
||||||
|
|
||||||
|
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||||
|
|
||||||
|
if ($services) $params["services"] = $services;
|
||||||
|
|
||||||
|
if ($getNonPassengerServices) $params["getNonPassengerServices"] = $getNonPassengerServices;
|
||||||
|
|
||||||
|
return $this->call($method,$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalDepartureBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetArrivalDepartureBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetArrivalBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepartureBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetDepartureBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrDepBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetArrDepBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetArrBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByCRS("GetDepBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetBoardByTIPLOC($method,$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices)
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($numRows) $params["numRows"] = $numRows;
|
||||||
|
|
||||||
|
if ($tiploc) $params["tiploc"] = $tiploc;
|
||||||
|
|
||||||
|
if ($time) $params["time"] = $time;
|
||||||
|
|
||||||
|
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||||
|
|
||||||
|
if ($filterTiploc) $params["filterTiploc"] = $filterTiploc;
|
||||||
|
|
||||||
|
if ($filterType) $params["filterType"] = $filterType;
|
||||||
|
|
||||||
|
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||||
|
|
||||||
|
if ($services) $params["services"] = $services;
|
||||||
|
|
||||||
|
if ($getNonPassengerServices) $params["getNonPassengerServices"] = $getNonPassengerServices;
|
||||||
|
|
||||||
|
return $this->call($method,$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalDepartureBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByTIPLOC("GetArrivalDepartureBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetArrivalBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByTIPLOC("GetArrivalBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepartureBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||||
|
{
|
||||||
|
return $this->GetBoardByTIPLOC("GetDepartureBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDepartures($method,$crs,$filterList,$time,$timeWindow,$filterTOC,$services)
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($crs) $params["crs"] = $crs;
|
||||||
|
|
||||||
|
if ($filterList) $params["filterList"] = $filterList;
|
||||||
|
|
||||||
|
if ($time) $params["time"] = $time;
|
||||||
|
|
||||||
|
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||||
|
|
||||||
|
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||||
|
|
||||||
|
if ($services) $params["services"] = $services;
|
||||||
|
|
||||||
|
return $this->call($method,$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetNextDepartures($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||||
|
{
|
||||||
|
return $this->GetDepartures("GetNextDepartures",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetFastestDepartures($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||||
|
{
|
||||||
|
return $this->GetDepartures("GetFastestDepartures",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetNextDeparturesWithDetails($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||||
|
{
|
||||||
|
return $this->GetDepartures("GetNextDeparturesWithDetails",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetFastestDeparturesWithDetails($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||||
|
{
|
||||||
|
return $this->GetDepartures("GetFastestDeparturesWithDetails",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetServiceDetailsByRID($rid="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($rid) $params["rid"] = $rid;
|
||||||
|
|
||||||
|
return $this->call("GetServiceDetailsByRID",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function QueryServices($serviceID="",$sdd="",$filterTime="",$filtercrs="",$tocFilter="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($serviceID) $params["serviceID"] = $serviceID;
|
||||||
|
|
||||||
|
if ($sdd) $params["sdd"] = $sdd;
|
||||||
|
|
||||||
|
if ($filterTime) $params["filterTime"] = $filterTime;
|
||||||
|
|
||||||
|
if ($filtercrs) $params["filtercrs"] = $filtercrs;
|
||||||
|
|
||||||
|
if ($tocFilter) $params["tocFilter"] = $tocFilter;
|
||||||
|
|
||||||
|
return $this->call("QueryServices",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetDisruptionList($CRSList="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($CRSList) $params["CRSList"] = $CRSList;
|
||||||
|
|
||||||
|
return $this->call("GetDisruptionList",$params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OpenLDBSVREFWS
|
||||||
|
{
|
||||||
|
private $accessToken;
|
||||||
|
|
||||||
|
private $trace;
|
||||||
|
|
||||||
|
private $wsdl = '<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<wsdl:definitions
|
||||||
|
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
|
||||||
|
xmlns:sv="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/"
|
||||||
|
targetNamespace="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/">
|
||||||
|
<wsdl:import
|
||||||
|
namespace="http://thalesgroup.com/RTTI/2015-05-14/ldbsv_ref/"
|
||||||
|
location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/rtti_2015-05-14_ldbsv_ref.wsdl"/>
|
||||||
|
<wsdl:service name="ldbsv">
|
||||||
|
<wsdl:port name="LDBSVRefServiceSoap12" binding="ref:LDBSVRefServiceSoap12">
|
||||||
|
<soap12:address location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/ldbsvref.asmx"/>
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>';
|
||||||
|
|
||||||
|
function __construct($accessToken,$trace=FALSE)
|
||||||
|
{
|
||||||
|
$this->accessToken = $accessToken;
|
||||||
|
|
||||||
|
$this->trace = $trace;
|
||||||
|
|
||||||
|
$soapOptions = array("trace"=>$this->trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
|
||||||
|
if (extension_loaded("zlib")) $soapOptions["compression"] = SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP;
|
||||||
|
|
||||||
|
$this->soapClient = new SoapClient("data:text/plain;base64,".base64_encode($this->wsdl),$soapOptions);
|
||||||
|
|
||||||
|
$soapVar = new SoapVar(array("ns2:TokenValue"=>$this->accessToken),SOAP_ENC_OBJECT);
|
||||||
|
|
||||||
|
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||||
|
|
||||||
|
$this->soapClient->__setSoapHeaders($soapHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function call($method,$params)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$response = $this->soapClient->$method($params);
|
||||||
|
}
|
||||||
|
catch(SoapFault $soapFault)
|
||||||
|
{
|
||||||
|
if ($this->trace)
|
||||||
|
{
|
||||||
|
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||||
|
|
||||||
|
$traceOutput["soapClientRequest"] = str_replace($this->accessToken,"",$this->soapClient->__getLastRequest());
|
||||||
|
|
||||||
|
$traceOutput["soapClientResponse"] = $this->soapClient->__getLastResponse();
|
||||||
|
|
||||||
|
print_r($traceOutput);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (isset($response)?$response:FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetReasonCode($reasonCode="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($reasonCode) $params["reasonCode"] = $reasonCode;
|
||||||
|
|
||||||
|
return $this->call("GetReasonCode",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetReasonCodeList()
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
return $this->call("GetReasonCodeList",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetSourceInstanceNames()
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
return $this->call("GetSourceInstanceNames",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetTOCList($currentVersion="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($currentVersion) $params["currentVersion"] = $currentVersion;
|
||||||
|
|
||||||
|
return $this->call("GetTOCList",$params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetStationList($currentVersion="")
|
||||||
|
{
|
||||||
|
$params = array();
|
||||||
|
|
||||||
|
if ($currentVersion) $params["currentVersion"] = $currentVersion;
|
||||||
|
|
||||||
|
return $this->call("GetStationList",$params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,21 +1,3 @@
|
||||||
/* FONTS */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'firamono';
|
|
||||||
src: url('/styles/fonts/firamono/firamono-regular.woff2') format('woff2'),
|
|
||||||
url('/styles/fonts/firamono/firamono-regular.woff') format('woff'),
|
|
||||||
url('/styles/fonts/firamono/firamono-regular.ttf') format('truetype');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'firamono';
|
|
||||||
src: url('/styles/fonts/firamono/firemono-500.woff2') format('woff2'),
|
|
||||||
url('/styles/fonts/firamono/firemono-500.woff') format('woff'),
|
|
||||||
url('/styles/fonts/firamono/firemono-500.ttf') format('truetype');
|
|
||||||
font-weight: 500;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* COLOR VARS */
|
/* COLOR VARS */
|
||||||
:root {
|
:root {
|
||||||
--main-bg-color: #aac4ee;
|
--main-bg-color: #aac4ee;
|
||||||
|
@ -104,8 +86,6 @@ body {
|
||||||
.actionbutton {
|
.actionbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-family: 'firamono', monospace;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #3c78d8;
|
background-color: #3c78d8;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
Reference in New Issue