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
| Time | Destination | Platform | Expected |
|---|---|---|---|
| 08:52 | Littlehampton CALLING AT: Haywards Heath (09:02)Burgess Hill (09:09) Hassocks (09:13) Preston Park (09:20) Hove (09:24) Portslade (09:27) Shoreham-by-Sea (09:32) Lancing (09:37) Worthing (09:41) West Worthing (09:44) Durrington-on-Sea (09:46) Goring-by-Sea (09:49) Angmering (09:54) Littlehampton (10:04) Southern (12 coaches) |
6 | 10:09 |
| 09:39 | Portsmouth Harbour and Bognor Regis CALLING AT: Three Bridges (09:44)Crawley (09:48) Horsham (09:57) Barnham (10:29) Chichester (10:37) Fishbourne (West Sussex) (10:41) Bosham (10:44) Nutbourne (10:48) Southbourne (10:51) Emsworth (10:55) Warblington (10:58) Havant (11:00) Hilsea (11:08) Fratton (11:12) Portsmouth & Southsea (11:16) Portsmouth Harbour (11:20) Train divides at Horsham CALLING AT: Christs Hospital (10:10)Billingshurst (10:16) Pulborough (10:23) Amberley (10:29) Arundel (10:33) Ford (10:39) Barnham (10:44) Bognor Regis (10:52) Southern (12 coaches) |
6 | Delayed |
| 09:45 | Brighton CALLING AT: Three Bridges (09:49)Haywards Heath (09:59) Burgess Hill (10:05) Brighton (10:18) Thameslink (12 coaches) |
7 | 09:55 |
| 09:49 | Peterborough CALLING AT: Horley (09:51)Redhill (09:59) Merstham (10:03) Coulsdon South (10:08) East Croydon (10:15) London Bridge (10:30) London Blackfriars (10:36) City Thameslink (10:38) Farringdon (10:41) London St Pancras (Intl) (10:45) Finsbury Park (10:52) Stevenage (11:13) Hitchin (11:20) Arlesey (11:26) Biggleswade (11:31) Sandy (11:35) St Neots (11:42) Huntingdon (11:50) Peterborough (12:08) Thameslink (12 coaches) |
1 | 09:52 |
| 09:52 | Littlehampton CALLING AT: Haywards Heath (10:02)Burgess Hill (10:09) Hassocks (10:13) Preston Park (10:20) Hove (10:24) Portslade (10:27) Shoreham-by-Sea (10:32) Lancing (10:37) Worthing (10:41) West Worthing (10:44) Durrington-on-Sea (10:46) Goring-by-Sea (10:49) Angmering (10:54) Littlehampton (11:04) Southern (12 coaches) |
6 | On time |
| 09:56 | Eastbourne | 7 | Cancelled |
| 09:56 | London Victoria | 4 | Cancelled |
| 09:59 | Reading CALLING AT: Redhill (10:07)Reigate (10:14) Dorking Deepdene (10:22) Guildford (10:41) Ash (10:51) North Camp (10:56) Farnborough North (11:00) Blackwater (11:04) Sandhurst (11:08) Crowthorne (11:12) Wokingham (11:18) Reading (11:27) Great Western Railway (3 coaches) |
2 | 10:04 |
| 10:01 | Brighton | 6 | Cancelled |
| 10:02 | Bedford CALLING AT: Horley (10:05)Salfords (10:09) Earlswood (Surrey) (10:12) Redhill (10:16) Purley (10:26) South Croydon (10:30) East Croydon (10:33) Norwood Junction (10:37) London Bridge (10:50) London Blackfriars (10:56) City Thameslink (10:58) Farringdon (11:01) London St Pancras (Intl) (11:05) St Albans (11:24) Harpenden (11:31) Luton Airport Parkway (11:36) Luton (11:40) Leagrave (11:45) Harlington (11:50) Flitwick (11:54) Bedford (12:09) Thameslink (12 coaches) |
1 | On time |