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

↓ 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 Cambridge / Peterborough may be delayed by up to 20 minutes. Latest information can be found in Status and Disruptions.
  • The escalators are out of order between the main concourse and platform 7 at Gatwick Airport station.
  • Trains between Lewes and Eastbourne will be delayed by up to 15 minutes. More details can be found in Status and Disruptions.
Time Destination Platform Expected
17:32 Bedford

CALLING AT:

Horley (17:35)
Salfords (17:39)
Earlswood (Surrey) (17:42)
Redhill (17:46)
Purley (17:56)
South Croydon (18:00)
East Croydon (18:03)
Norwood Junction (18:07)
London Bridge (18:20)
London Blackfriars (18:26)
City Thameslink (18:28)
Farringdon (18:31)
London St Pancras (Intl) (18:35)
St Albans (18:54)
Harpenden (19:01)
Luton Airport Parkway (19:06)
Luton (19:10)
Leagrave (19:15)
Harlington (19:20)
Flitwick (19:24)
Bedford (19:39)

Thameslink (12 coaches)

1 17:34
17:32 London Victoria

CALLING AT:

East Croydon (17:48)
Clapham Junction (17:59)
London Victoria (18:06)

Southern (8 coaches)

5 17:48
17:36 Bedford

CALLING AT:

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

Thameslink (12 coaches)

4 On time
17:36 Brighton

CALLING AT:

Three Bridges (17:40)
Balcombe (17:47)
Haywards Heath (17:52)
Wivelsfield (17:57)
Burgess Hill (17:59)
Hassocks (18:03)
Preston Park (18:10)
Brighton (18:15)

Thameslink (12 coaches)

6 On time
17:39 Portsmouth Harbour and Bognor Regis

CALLING AT:

Three Bridges (17:44)
Crawley (17:48)
Littlehaven (17:56)
Horsham (18:00)
Barnham (18:31)
Chichester (18:40)
Fishbourne (West Sussex) (18:43)
Bosham (18:47)
Nutbourne (18:50)
Southbourne (18:53)
Emsworth (18:56)
Warblington (19:00)
Havant (19:02)
Hilsea (19:10)
Fratton (19:14)
Portsmouth & Southsea (19:18)
Portsmouth Harbour (19:22)

Train divides at Horsham

CALLING AT:

Christs Hospital (18:12)
Billingshurst (18:18)
Pulborough (18:25)
Amberley (18:32)
Arundel (18:37)
Ford (18:43)
Barnham (18:48)
Bognor Regis (18:55)

Southern (12 coaches)

7 On time
17:40 London Victoria

CALLING AT:

London Victoria (18:11)

Gatwick Express (8 coaches)

5 On time
17:41 Three Bridges

CALLING AT:

Three Bridges (17:46)

Thameslink (12 coaches)

3 On time
17:43 London Victoria

CALLING AT:

East Croydon (17:58)
Clapham Junction (18:07)
London Victoria (18:15)

Southern (12 coaches)

1 On time
17:45 Brighton

CALLING AT:

Three Bridges (17:49)
Haywards Heath (17:59)
Burgess Hill (18:05)
Hassocks (18:09)
Preston Park (18:16)
Brighton (18:21)

Thameslink (12 coaches)

7 17:49
17:46 Cambridge

CALLING AT:

East Croydon (18:01)
London Bridge (18:15)
London Blackfriars (18:21)
City Thameslink (18:23)
Farringdon (18:26)
London St Pancras (Intl) (18:30)
Finsbury Park (18:37)
Stevenage (18:58)
Hitchin (19:04)
Letchworth Garden City (19:09)
Baldock (19:13)
Ashwell & Morden (19:18)
Royston (19:22)
Cambridge (19:39)

Thameslink (12 coaches)

4 On time