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

  • Major engineering work will be taking place in the Cambridge area. Latest information can be found in Status and Disruptions.
Time Destination Platform Expected
23:19 Horsham

CALLING AT:

Three Bridges (23:24)
Crawley (23:29)
Ifield (23:32)
Littlehaven (23:38)
Horsham (23:42)

Thameslink (12 coaches)

3 On time
23:21 Hastings and Worthing

CALLING AT:

Haywards Heath (23:31)
Wivelsfield (23:39)
Plumpton (23:46)
Cooksbridge (23:50)
Lewes (23:55)
Berwick (Sussex) (00:05)
Polegate (00:10)
Hampden Park (00:15)
Eastbourne (00:19)
Pevensey & Westham (00:31)
Cooden Beach (00:38)
Collington (00:42)
Bexhill (00:44)
St Leonards Warrior Square (00:50)
Hastings (00:54)

Train divides at Haywards Heath

CALLING AT:

Preston Park (23:49)
Hove (23:53)
Portslade (23:56)
Southwick (23:59)
Shoreham-by-Sea (00:03)
Lancing (00:07)
Worthing (00:11)

Southern (8 coaches)

6 On time
23:22 Reading

CALLING AT:

Redhill (23:32)
Reigate (23:39)
Dorking Deepdene (23:46)
Guildford (00:04)
North Camp (00:17)
Blackwater (00:23)
Wokingham (00:32)
Reading (00:45)

Great Western Railway

2 23:28
23:27 Brighton

CALLING AT:

Haywards Heath (23:41)
Burgess Hill (23:51)
Hassocks (23:55)
Brighton (00:06)

Southern (4 coaches)

7 On time
23:31 Brighton

CALLING AT:

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

Gatwick Express (8 coaches)

6 On time
23:34 Bedford

CALLING AT:

East Croydon (23:53)
London Blackfriars (00:19)
Farringdon (00:26)
London St Pancras (Intl) (00:30)
West Hampstead Thameslink (00:39)
Brent Cross West (00:42)
St Albans (00:55)
Harpenden (01:02)
Luton Airport Parkway (01:08)
Luton (01:11)
Leagrave (01:16)
Harlington (01:20)
Flitwick (01:24)
Bedford (01:35)

Thameslink (12 coaches)

4 On time
23:35 Brighton

CALLING AT:

Three Bridges (23:39)
Balcombe (23:46)
Haywards Heath (23:51)
Wivelsfield (23:57)
Burgess Hill (23:59)
Hassocks (00:03)
Preston Park (00:09)
Brighton (00:13)

Thameslink (12 coaches)

7 On time
23:35 Peterborough

CALLING AT:

Horley (23:37)
Salfords (23:41)
Earlswood (Surrey) (23:45)
Redhill (23:49)
Merstham (23:53)
Coulsdon South (23:58)
Purley (00:03)
East Croydon (00:09)
London Blackfriars (00:36)
Farringdon (00:41)
London St Pancras (Intl) (00:45)
Finsbury Park (00:52)
Stevenage (01:32)
Hitchin (01:41)
Arlesey (01:48)
Biggleswade (01:53)
Sandy (01:57)
St Neots (02:04)
Huntingdon (02:11)
Peterborough (02:30)

Thameslink (12 coaches)

1 On time
23:39 Horsham

CALLING AT:

Three Bridges (23:44)
Crawley (23:49)
Horsham (23:58)

Southern (8 coaches)

6 On time
23:45 Horsham

CALLING AT:

Three Bridges (23:50)
Crawley (23:55)
Ifield (23:58)
Littlehaven (00:04)
Horsham (00:08)

Thameslink (12 coaches)

3 On time