Please note: Rail Delivery Group plans to retire the National Rail Data Portal (including OpenLDBSVWS) in early 2026. Alternatives are now available via the Rail Data Marketplace
<?php
require("OpenLDBSVWS.php");
date_default_timezone_set("Europe/London");
$OpenLDBSVWS = new OpenLDBSVWS("YOUR_ACCESS_TOKEN");
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"PAD",date("H:i:s",time()),120);
header("Content-Type: text/plain");
print_r($response);
?>
stdClass Object
(
[GetBoardResult] => stdClass Object
(
[generatedAt] => 2026-02-18T02:01:21.066222+00:00
[locationName] => London Paddington
[crs] => PAD
[stationManager] => Network Rail
[stationManagerCode] => RT
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[rid] => 202602188023172
[uid] => P23172
[trainid] => 2R01
[rsid] => GW325800
[sdd] => 2026-02-18
[operator] => Great Western Railway
[operatorCode] => GW
[std] => 2026-02-18T03:35:00
[etd] => 2026-02-18T03:35:00
[departureType] => Forecast
[departureSource] => Darwin
[platform] => 11
[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] => Reading
[crs] => RDG
[tiploc] => RDNGSTN
)
)
)
[category] => OO
[activities] => TB
)
)
)
)
)