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
<!DOCTYPE html>
<html lang="en">
<head>
<style type='text/css'>
body {
font-family: monospace;
white-space: nowrap;
}
table {
border-collapse: collapse;
}
th,td {
border: 1px solid #eee;
padding: 10px;
vertical-align:top;
}
th:nth-child(1),th:nth-child(2) {
text-align: left;
}
th:nth-child(3),td:nth-child(3) {
text-align: center;
}
th:nth-child(4),td:nth-child(4) {
text-align: right;
}
</style>
</head>
<body>
<?php
require("OpenLDBWS.php");
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
$response = $OpenLDBWS->GetDepBoardWithDetails(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><strong>{destination}</strong>{detail}</td>
<td>{platform}</td>
<td>{etd}</td>
</tr>
";
$template["footer"] = "
</tbody>
</table>
";
if (isset($response->GetStationBoardResult))
{
print "<p><strong>".$response->GetStationBoardResult->locationName."</strong> Departures</p>";
if (isset($response->GetStationBoardResult->nrccMessages))
{
print "<ul>";
foreach($response->GetStationBoardResult->nrccMessages->message as $message)
{
print "<li>".$message->{"_"}."</li>";
}
print "</ul>";
}
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);
$detail = "";
if (($service->etd != "Cancelled") && isset($service->subsequentCallingPoints))
{
foreach($service->subsequentCallingPoints->callingPointList as $k => $callingPointList)
{
$callingPoints = $callingPointList->callingPoint;
if ($k)
{
$callingPoint = array_shift($callingPoints);
$detail .= "<p>Train divides at <strong>".$callingPoint->locationName."</strong></p>";
}
$detail .= "<p>CALLING AT:</p>";
foreach($callingPoints as $callingPoint)
{
$detail .= $callingPoint->locationName." (".(($callingPoint->st == "On time")?$callingPoint->et:$callingPoint->st).")<br />";
}
}
$detail .= "<p>".$service->operator.(isset($service->length)?" (".$service->length." coaches)":"")."</p>";
}
$row = str_replace("{detail}",$detail,$row);
print $row;
}
print $template["footer"];
}
else
{
print "<p>No services within 2 hours.</p>";
}
}
?>
</body>
</html>
Gatwick Airport Departures
Wintry weather, brought by Storm Goretti, is affecting services across England, Scotland and Wales. Service is suspended or reduced on multiple routes across the network. Please check your full journey before you travel. More details and the full impact to your journey can be found in Status and Disruptions.
| Time | Destination | Platform | Expected |
|---|---|---|---|
| 03:31 | Three Bridges CALLING AT: Three Bridges (03:36)Thameslink |
2 | On time |
| 03:45 | Bedford CALLING AT: Horley (03:48)Purley (04:02) East Croydon (04:09) London Blackfriars (04:35) London St Pancras (Intl) (04:43) Kentish Town (04:48) West Hampstead Thameslink (04:52) Cricklewood (04:55) Brent Cross West (04:58) Hendon (05:00) Mill Hill Broadway (05:03) Elstree & Borehamwood (05:07) Radlett (05:11) St Albans (05:17) Harpenden (05:24) Luton Airport Parkway (05:29) Luton (05:33) Leagrave (05:38) Harlington (05:43) Flitwick (05:47) Bedford (06:01) Thameslink |
1 | On time |
| 04:20 | Bedford CALLING AT: East Croydon (04:39)London Blackfriars (05:05) City Thameslink (05:08) Farringdon (05:10) London St Pancras (Intl) (05:15) West Hampstead Thameslink (05:24) Brent Cross West (05:27) St Albans (05:41) Harpenden (05:48) Luton Airport Parkway (05:53) Luton (05:57) Leagrave (06:01) Harlington (06:06) Flitwick (06:10) Bedford (06:24) Thameslink |
1 | On time |
| 04:31 | Three Bridges | Cancelled | |
| 04:41 | Bedford CALLING AT: Horley (04:44)Redhill (04:52) Purley (05:01) East Croydon (05:08) Norwood Junction (05:14) London Bridge (05:26) London Blackfriars (05:33) City Thameslink (05:35) Farringdon (05:38) London St Pancras (Intl) (05:42) West Hampstead Thameslink (05:51) St Albans (06:05) Harpenden (06:12) Luton Airport Parkway (06:18) Luton (06:22) Leagrave (06:27) Harlington (06:32) Flitwick (06:36) Bedford (06:50) Thameslink |
1 | On time |