↓ Output (cached 60s)


<!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:"&nbsp;"),$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

  • Trains running between Stevenage and Peterborough may be delayed by up to 45 minutes, cancelled or revised. Latest information can be found in Status and Disruptions.
Time Destination Platform Expected
16:05 Three Bridges   Cancelled
16:26 London Victoria

CALLING AT:

East Croydon (16:41)
Clapham Junction (16:51)
London Victoria (16:58)

Southern (8 coaches)

4 On time
16:26 Ore

CALLING AT:

Haywards Heath (16:37)
Wivelsfield (16:42)
Plumpton (16:49)
Lewes (16:56)
Polegate (17:09)
Eastbourne (17:19)
Hampden Park (17:29)
Pevensey & Westham (17:34)
Pevensey Bay (17:37)
Normans Bay (17:41)
Cooden Beach (17:45)
Collington (17:49)
Bexhill (17:51)
St Leonards Warrior Square (17:57)
Hastings (18:01)
Ore (18:05)

Southern (8 coaches)

7 On time
16:29 Reading

CALLING AT:

Redhill (16:37)
Reigate (16:44)
Betchworth (16:49)
Dorking Deepdene (16:53)
Dorking West (16:56)
Shalford (17:09)
Guildford (17:14)
Ash (17:24)
North Camp (17:29)
Farnborough North (17:33)
Blackwater (17:38)
Sandhurst (17:42)
Crowthorne (17:46)
Wokingham (17:52)
Reading (18:02)

Great Western Railway

2 On time
16:31 Brighton

CALLING AT:

Haywards Heath (16:42)
Brighton (16:57)

Gatwick Express (8 coaches)

6 On time
16:32 Bedford

CALLING AT:

Horley (16:35)
Salfords (16:39)
Earlswood (Surrey) (16:42)
Redhill (16:46)
Purley (16:56)
South Croydon (17:00)
East Croydon (17:03)
Norwood Junction (17:07)
London Bridge (17:20)
London Blackfriars (17:26)
City Thameslink (17:28)
Farringdon (17:31)
London St Pancras (Intl) (17:35)
St Albans (17:54)
Harpenden (18:00)
Luton (18:07)
Leagrave (18:11)
Bedford (18:27)

Thameslink (12 coaches)

2 On time
16:32 London Victoria

CALLING AT:

East Croydon (16:48)
Clapham Junction (16:58)
London Victoria (17:08)

Southern (12 coaches)

5 On time
16:35 Brighton

CALLING AT:

Three Bridges (16:39)
Balcombe (16:46)
Haywards Heath (16:51)
Wivelsfield (16:56)
Burgess Hill (16:58)
Hassocks (17:02)
Preston Park (17:09)
Brighton (17:14)

Thameslink (12 coaches)

7 On time
16:35 Three Bridges

CALLING AT:

Three Bridges (16:40)

Thameslink (12 coaches)

3 16:37
16:36 Bedford

CALLING AT:

East Croydon (16:51)
London Bridge (17:05)
London Blackfriars (17:11)
City Thameslink (17:13)
Farringdon (17:16)
London St Pancras (Intl) (17:20)
St Albans (17:40)
Harpenden (17:47)
Luton Airport Parkway (17:53)
Luton (17:57)
Leagrave (18:01)
Harlington (18:06)
Flitwick (18:10)
Bedford (18:24)

Thameslink (12 coaches)

4 16:38