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
Major engineering work between London St Pancras International and London Blackfriars will mean that no Thameslink trains can run through central London from Saturday 23 May until Monday 25 May inclusive. More details and the full impact to your journey can be found in Status and Disruptions.
| Time | Destination | Platform | Expected |
|---|---|---|---|
| 18:24 | Brighton CALLING AT: Three Bridges (18:28)Haywards Heath (18:38) Burgess Hill (18:43) Brighton (18:55) Thameslink |
7 | 18:28 |
| 18:26 | London Victoria CALLING AT: East Croydon (18:40)Selhurst (18:44) Clapham Junction (18:54) London Victoria (19:03) Southern (8 coaches) |
4 | 18:37 |
| 18:26 | Reading CALLING AT: Redhill (18:34)Reigate (18:41) Dorking Deepdene (18:49) Guildford (19:07) Ash (19:17) North Camp (19:22) Farnborough North (19:26) Blackwater (19:30) Sandhurst (19:34) Crowthorne (19:38) Wokingham (19:44) Reading (19:54) Great Western Railway |
2 | 18:30 |
| 18:34 | London Bridge CALLING AT: Horley (18:36)Redhill (18:44) Merstham (18:48) Coulsdon South (18:53) Purley (18:57) East Croydon (19:02) Norwood Junction (19:07) London Bridge (19:21) Thameslink |
1 | On time |
| 18:35 | Brighton CALLING AT: Three Bridges (18:39)Haywards Heath (18:49) Burgess Hill (18:55) Hassocks (18:58) Brighton (19:08) Southern (8 coaches) |
7 | On time |
| 18:36 | London Bridge CALLING AT: East Croydon (18:54)London Bridge (19:10) Thameslink (12 coaches) |
4 | On time |
| 18:38 | Brighton CALLING AT: Three Bridges (18:42)Balcombe (18:49) Haywards Heath (18:54) Wivelsfield (18:59) Burgess Hill (19:01) Hassocks (19:05) Preston Park (19:11) Brighton (19:15) Thameslink (12 coaches) |
7 | On time |
| 18:42 | London Victoria CALLING AT: London Victoria (19:11)Gatwick Express (8 coaches) |
5 | On time |
| 18:43 | London Victoria CALLING AT: Redhill (18:51)East Croydon (19:04) Clapham Junction (19:14) London Victoria (19:21) Southern (8 coaches) |
1 | 18:45 |
| 18:45 | London Victoria CALLING AT: East Croydon (19:00)Clapham Junction (19:11) London Victoria (19:18) Southern (12 coaches) |
4 | On time |