<!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
The lifts are out of order between platforms 1, 2, 3 & 4 and the overbridge at Gatwick Airport station. Step free access is still available to all areas.
| Time | Destination | Platform | Expected |
|---|---|---|---|
| 13:36 | Bedford CALLING AT: East Croydon (13:51)London Bridge (14:06) London Blackfriars (14:13) City Thameslink (14:15) Farringdon (14:17) London St Pancras (Intl) (14:22) West Hampstead Thameslink (14:29) St Albans (14:41) Harpenden (14:47) Luton Airport Parkway (14:52) Luton (14:56) Leagrave (15:01) Harlington (15:06) Flitwick (15:10) Bedford (15:22) Thameslink (12 coaches) |
4 | 13:40 |
| 13:39 | Portsmouth Harbour and Bognor Regis CALLING AT: Three Bridges (13:44)Crawley (13:48) Horsham (13:57) Barnham (14:29) Chichester (14:37) Fishbourne (West Sussex) (14:41) Bosham (14:44) Nutbourne (14:48) Southbourne (14:51) Emsworth (14:54) Warblington (14:57) Havant (14:59) Hilsea (15:08) Fratton (15:12) Portsmouth & Southsea (15:16) Portsmouth Harbour (15:20) Train divides at Horsham CALLING AT: Christs Hospital (14:09)Billingshurst (14:15) Pulborough (14:22) Amberley (14:28) Arundel (14:32) Ford (14:38) Barnham (14:43) Bognor Regis (14:52) Southern (12 coaches) |
6 | On time |
| 13:40 | London Victoria CALLING AT: London Victoria (14:12)Gatwick Express (12 coaches) |
5 | 13:43 |
| 13:43 | London Victoria CALLING AT: East Croydon (13:58)Selhurst (14:01) Clapham Junction (14:09) London Victoria (14:16) Southern (12 coaches) |
2 | On time |
| 13:45 | Brighton CALLING AT: Three Bridges (13:49)Haywards Heath (13:59) Burgess Hill (14:05) Brighton (14:18) Thameslink (12 coaches) |
7 | On time |
| 13:46 | Cambridge CALLING AT: East Croydon (14:01)London Bridge (14:15) London Blackfriars (14:21) City Thameslink (14:23) Farringdon (14:26) London St Pancras (Intl) (14:30) Finsbury Park (14:37) Stevenage (15:01) Hitchin (15:07) Letchworth Garden City (15:12) Baldock (15:16) Ashwell & Morden (15:21) Royston (15:25) Cambridge (15:41) Thameslink (12 coaches) |
4 | On time |
| 13:47 | Horsham CALLING AT: Three Bridges (13:52)Crawley (13:57) Ifield (14:00) Littlehaven (14:06) Horsham (14:10) Thameslink (12 coaches) |
3 | On time |
| 13:49 | Peterborough CALLING AT: Horley (13:51)Redhill (13:59) Merstham (14:03) Coulsdon South (14:08) East Croydon (14:15) London Bridge (14:30) London Blackfriars (14:36) City Thameslink (14:38) Farringdon (14:41) London St Pancras (Intl) (14:45) Finsbury Park (14:52) Stevenage (15:13) Hitchin (15:20) Arlesey (15:26) Biggleswade (15:31) Sandy (15:35) St Neots (15:42) Huntingdon (15:50) Peterborough (16:06) Thameslink (12 coaches) |
1 | On time |
| 13:52 | Littlehampton CALLING AT: Haywards Heath (14:02)Burgess Hill (14:09) Hassocks (14:13) Preston Park (14:20) Hove (14:23) Portslade (14:27) Shoreham-by-Sea (14:31) Lancing (14:36) Worthing (14:40) West Worthing (14:42) Durrington-on-Sea (14:45) Goring-by-Sea (14:48) Angmering (14:52) Littlehampton (15:02) Southern (8 coaches) |
6 | On time |
| 13:56 | London Victoria CALLING AT: East Croydon (14:11)Clapham Junction (14:21) London Victoria (14:28) Southern (8 coaches) |
4 | On time |