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

  • Poor weather is impacting services running across the Great Western Railway network. More details can be found in Status and Disruptions.
Time Destination Platform Expected
22:45 Brighton

CALLING AT:

Three Bridges (22:49)
Haywards Heath (22:59)
Burgess Hill (23:05)
Brighton (23:18)

Thameslink (12 coaches)

7 On time
22:46 Cambridge

CALLING AT:

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

Thameslink (12 coaches)

4 On time
22:47 Horsham

CALLING AT:

Three Bridges (22:52)
Crawley (22:57)
Ifield (23:00)
Littlehaven (23:06)
Horsham (23:10)

Thameslink (12 coaches)

3 On time
22:49 Bognor Regis and Lewes

CALLING AT:

Three Bridges (22:53)
Haywards Heath (23:02)
Burgess Hill (23:11)
Hassocks (23:14)
Preston Park (23:21)
Hove (23:25)
Portslade (23:28)
Southwick (23:31)
Shoreham-by-Sea (23:35)
Lancing (23:39)
Worthing (23:43)
West Worthing (23:46)
Durrington-on-Sea (23:48)
Goring-by-Sea (23:51)
Angmering (23:55)
Ford (00:03)
Barnham (00:08)
Bognor Regis (00:22)

Train divides at Haywards Heath

CALLING AT:

Wivelsfield (23:13)
Cooksbridge (23:22)
Lewes (23:27)

Southern (8 coaches)

6 22:52
22:49 Peterborough

CALLING AT:

Horley (22:51)
Salfords (22:55)
Earlswood (Surrey) (22:59)
Redhill (23:03)
East Croydon (23:15)
London Bridge (23:30)
London Blackfriars (23:36)
Farringdon (23:41)
London St Pancras (Intl) (23:45)
Finsbury Park (23:52)
Stevenage (00:13)
Hitchin (00:20)
Arlesey (00:26)
Biggleswade (00:31)
Sandy (00:35)
St Neots (00:42)
Huntingdon (00:49)
Peterborough (01:07)

Thameslink (12 coaches)

1 On time
22:50 Horsham

CALLING AT:

Ockley (22:51)
Three Bridges (22:55)
Warnham (22:57)
Horsham (23:12)

Southern (5 coaches)

3 On time
22:56 Brighton

CALLING AT:

Haywards Heath (23:07)
Burgess Hill (23:22)
Hassocks (23:25)
Brighton (23:35)

Southern (8 coaches)

7 23:00
22:56 London Victoria

CALLING AT:

East Croydon (23:12)
Clapham Junction (23:22)
London Victoria (23:29)

Southern (8 coaches)

2 On time
23:01 Brighton

CALLING AT:

Haywards Heath (23:13)
Brighton (23:32)

Gatwick Express (8 coaches)

3 23:05
23:01 London Victoria

CALLING AT:

East Croydon (23:19)
Clapham Junction (23:29)
London Victoria (23:37)

Southern (4 coaches)

2 On time