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

  • A temporary timetable is in operation between Ore / Eastbourne and London Victoria from Monday to Friday. More details can be found in the Disruptions area of the National Rail website.
Time Destination Platform Expected
11:47 Horsham

CALLING AT:

Three Bridges (11:52)
Crawley (11:57)
Ifield (12:00)
Faygate (12:04)
Littlehaven (12:08)
Horsham (12:12)

Thameslink (12 coaches)

3 On time
11:49 Peterborough

CALLING AT:

Horley (11:51)
Redhill (11:59)
Merstham (12:03)
Coulsdon South (12:08)
East Croydon (12:15)
London Bridge (12:30)
London Blackfriars (12:36)
City Thameslink (12:38)
Farringdon (12:41)
London St Pancras (Intl) (12:45)
Finsbury Park (12:52)
Stevenage (13:15)
Hitchin (13:21)
Arlesey (13:27)
Biggleswade (13:32)
Sandy (13:36)
St Neots (13:43)
Huntingdon (13:51)
Peterborough (14:08)

Thameslink (12 coaches)

1 On time
11:52 Littlehampton

CALLING AT:

Haywards Heath (12:03)
Burgess Hill (12:09)
Hassocks (12:13)
Preston Park (12:20)
Hove (12:24)
Portslade (12:27)
Shoreham-by-Sea (12:32)
Lancing (12:37)
Worthing (12:41)
West Worthing (12:44)
Durrington-on-Sea (12:46)
Goring-by-Sea (12:49)
Angmering (12:54)
Littlehampton (13:04)

Southern (8 coaches)

6 On time
11:56 London Victoria

CALLING AT:

East Croydon (12:11)
Clapham Junction (12:21)
London Victoria (12:28)

Southern (8 coaches)

4 On time
11:59 Reading

CALLING AT:

Redhill (12:07)
Reigate (12:14)
Dorking Deepdene (12:22)
Guildford (12:41)
Ash (12:51)
North Camp (12:56)
Farnborough North (13:00)
Blackwater (13:04)
Sandhurst (13:08)
Crowthorne (13:12)
Wokingham (13:18)
Reading (13:27)

Great Western Railway (3 coaches)

2 On time
12:01 Brighton

CALLING AT:

Haywards Heath (12:11)
Brighton (12:27)

Gatwick Express (8 coaches)

6 On time
12:02 Bedford

CALLING AT:

Horley (12:05)
Salfords (12:09)
Earlswood (Surrey) (12:12)
Redhill (12:16)
Purley (12:26)
South Croydon (12:30)
East Croydon (12:33)
Norwood Junction (12:37)
London Bridge (12:50)
London Blackfriars (12:56)
City Thameslink (12:58)
Farringdon (13:01)
London St Pancras (Intl) (13:05)
St Albans (13:24)
Harpenden (13:31)
Luton Airport Parkway (13:36)
Luton (13:40)
Leagrave (13:45)
Harlington (13:50)
Flitwick (13:54)
Bedford (14:09)

Thameslink (12 coaches)

1 On time
12:05 Brighton

CALLING AT:

Three Bridges (12:09)
Balcombe (12:16)
Haywards Heath (12:21)
Wivelsfield (12:26)
Burgess Hill (12:28)
Hassocks (12:32)
Preston Park (12:38)
Brighton (12:43)

Thameslink (12 coaches)

7 On time
12:05 Three Bridges

CALLING AT:

Three Bridges (12:10)

Thameslink (8 coaches)

3 On time
12:06 Bedford

CALLING AT:

East Croydon (12:21)
London Bridge (12:35)
London Blackfriars (12:41)
City Thameslink (12:43)
Farringdon (12:46)
London St Pancras (Intl) (12:50)
West Hampstead Thameslink (12:59)
St Albans (13:11)
Harpenden (13:17)
Luton Airport Parkway (13:23)
Luton (13:27)
Leagrave (13:31)
Harlington (13:36)
Flitwick (13:40)
Bedford (13:54)

Thameslink (12 coaches)

4 On time