Please note: Rail Delivery Group plans to retire the National Rail Data Portal (including OpenLDBWS) in early 2026. Alternatives are now available via the Rail Data Marketplace
<?php
require("OpenLDBWS.php");
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
$response = $OpenLDBWS->GetFastestDepartures("PAD",array("RDG","BRI"));
header("Content-Type: text/plain");
print_r($response);
?>
stdClass Object
(
[DeparturesBoard] => stdClass Object
(
[generatedAt] => 2026-09-12T01:00:02.9740568+01:00
[locationName] => London Paddington
[crs] => PAD
[nrccMessages] => stdClass Object
(
[message] => Array
(
[0] => stdClass Object
(
[_] => The lift serving platform 12 is out of order at London Paddington station.
)
[1] => stdClass Object
(
[_] => <p>Reduced service between London Paddington and Heathrow Airport Terminal 5 / Reading. Latest information can be found in the Disruptions area of the <a href="https://www.nationalrail.co.uk/service-disruptions/kensal-green-20260906/">National Rail website. </a></p>
)
)
)
[platformAvailable] => 1
[departures] => stdClass Object
(
[destination] => Array
(
[0] => stdClass Object
(
[service] => stdClass Object
(
[std] => 01:45
[etd] => On time
[platform] => 2
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 8638956PADTON__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Reading
[crs] => RDG
)
)
)
)
[crs] => RDG
)
[1] => stdClass Object
(
[service] =>
[crs] => BRI
)
)
)
)
)