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-19T02:13:54.7244047+00:00
[locationName] => London Paddington
[crs] => PAD
[stationManager] => Network Rail
[stationManagerCode] => RT
[nrccMessages] => stdClass Object
(
[message] => Array
(
[0] => stdClass Object
(
[category] => Train service
[severity] => Minor
[xhtmlMessage] =>
A reduced Great Western Railway service is running between London Paddington and Reading. Latest information can be found in <a href="https://www.nationalrail.co.uk/service-disruptions/southall-20260218/">Status and Disruptions.</a>
)
)
)
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[rid] => 202602198023172
[uid] => P23172
[trainid] => 2R01
[rsid] => GW325800
[sdd] => 2026-02-19
[operator] => Great Western Railway
[operatorCode] => GW
[isCancelled] => 1
[std] => 2026-02-19T03:35:00
[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
)
)
)
[cancelReason] => stdClass Object
(
[_] => 772
[tiploc] =>
[near] =>
)
[category] => OO
[activities] => TB
)
)
)
)
)