<!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
Lines have now reopened following a safety inspection of the track between Ash and Guildford. However, whilst service recovers, trains running between these stations may be cancelled or delayed by up to 20 minutes. More details can be found in Latest Travel News.
Time | Destination | Platform | Expected |
---|---|---|---|
12:44 | Brighton CALLING AT: Three Bridges (12:48)Balcombe (12:55) Haywards Heath (13:00) Burgess Hill (13:06) Brighton (13:17) Thameslink (12 coaches) |
7 | 12:51 |
12:46 | Cambridge CALLING AT: East Croydon (13:01)London Bridge (13:15) London Blackfriars (13:21) City Thameslink (13:23) Farringdon (13:26) London St Pancras (Intl) (13:30) Finsbury Park (13:37) Stevenage (14:01) Hitchin (14:08) Letchworth Garden City (14:13) Baldock (14:17) Royston (14:24) Cambridge (14:40) Thameslink (12 coaches) |
4 | 12:56 |
12:49 | Peterborough CALLING AT: Horley (12:51)Redhill (12:59) Merstham (13:03) Coulsdon South (13:08) East Croydon (13:15) London Bridge (13:30) London Blackfriars (13:36) City Thameslink (13:38) Farringdon (13:41) London St Pancras (Intl) (13:45) Finsbury Park (13:52) Stevenage (14:13) Hitchin (14:19) Arlesey (14:25) Biggleswade (14:30) Sandy (14:34) St Neots (14:41) Huntingdon (14:49) Peterborough (15:05) Thameslink (12 coaches) |
1 | 12:53 |
12:51 | Littlehampton CALLING AT: Haywards Heath (13:02)Burgess Hill (13:09) Hassocks (13:12) Preston Park (13:19) Hove (13:23) Portslade (13:26) Shoreham-by-Sea (13:31) Lancing (13:35) Worthing (13:39) West Worthing (13:42) Durrington-on-Sea (13:44) Goring-by-Sea (13:47) Angmering (13:51) Littlehampton (14:01) Southern (8 coaches) |
7 | 12:54 |
12:54 | London Victoria CALLING AT: East Croydon (13:09)Clapham Junction (13:19) London Victoria (13:28) Southern (8 coaches) |
4 | 13:05 |
13:02 | Bedford CALLING AT: Horley (13:04)Salfords (13:09) Earlswood (Surrey) (13:13) Redhill (13:17) Purley (13:27) East Croydon (13:33) Norwood Junction (13:37) London Bridge (13:50) London Blackfriars (13:56) City Thameslink (13:58) Farringdon (14:01) London St Pancras (Intl) (14:05) St Albans (14:24) Harpenden (14:31) Luton Airport Parkway (14:36) Luton (14:40) Leagrave (14:44) Harlington (14:49) Flitwick (14:53) Bedford (15:05) Thameslink (12 coaches) |
2 | On time |
13:02 | Brighton CALLING AT: Brighton (13:27)Gatwick Express (8 coaches) |
7 | On time |
13:03 | London Victoria CALLING AT: East Croydon (13:18)Clapham Junction (13:28) London Victoria (13:36) Southern (8 coaches) |
4 | On time |
13:06 | Bedford CALLING AT: East Croydon (13:21)London Bridge (13:34) London Blackfriars (13:41) City Thameslink (13:43) Farringdon (13:46) London St Pancras (Intl) (13:50) West Hampstead Thameslink (13:59) St Albans (14:11) Harpenden (14:17) Luton Airport Parkway (14:22) Luton (14:26) Leagrave (14:31) Harlington (14:35) Flitwick (14:39) Bedford (14:51) Thameslink (8 coaches) |
2 | On time |
13:06 | Brighton CALLING AT: Three Bridges (13:10)Haywards Heath (13:20) Wivelsfield (13:25) Burgess Hill (13:27) Hassocks (13:31) Preston Park (13:37) Brighton (13:43) Thameslink |
7 | On time |