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
16:49 Peterborough

CALLING AT:

Horley (16:52)
Redhill (16:59)
Merstham (17:04)
Coulsdon South (17:09)
East Croydon (17:15)
London Bridge (17:30)
London Blackfriars (17:36)
City Thameslink (17:38)
Farringdon (17:41)
London St Pancras (Intl) (17:45)
Finsbury Park (17:52)
Stevenage (18:13)
Hitchin (18:20)
Arlesey (18:26)
Biggleswade (18:31)
Sandy (18:35)
St Neots (18:42)
Huntingdon (18:50)
Peterborough (19:08)

Thameslink (12 coaches)

1 On time
16:52 Littlehampton

CALLING AT:

Haywards Heath (17:02)
Burgess Hill (17:09)
Hassocks (17:13)
Preston Park (17:21)
Hove (17:25)
Portslade (17:29)
Shoreham-by-Sea (17:34)
Lancing (17:38)
Worthing (17:43)
West Worthing (17:45)
Durrington-on-Sea (17:48)
Goring-by-Sea (17:51)
Angmering (17:56)
Littlehampton (18:06)

Southern (8 coaches)

6 On time
16:53 Bedford

CALLING AT:

East Croydon (17:09)
London Bridge (17:24)
London Blackfriars (17:31)
City Thameslink (17:33)
Farringdon (17:36)
London St Pancras (Intl) (17:40)
St Albans (18:00)
Harpenden (18:06)
Luton Airport Parkway (18:11)
Luton (18:15)
Leagrave (18:20)
Harlington (18:24)
Flitwick (18:28)
Bedford (18:41)

Thameslink (12 coaches)

5 On time
16:56 Bedford

CALLING AT:

Redhill (17:04)
Purley (17:14)
South Croydon (17:18)
East Croydon (17:22)
London Bridge (17:39)
London Blackfriars (17:46)
City Thameslink (17:48)
Farringdon (17:51)
London St Pancras (Intl) (17:55)
St Albans (18:18)
Harpenden (18:27)
Luton Airport Parkway (18:32)
Luton (18:36)
Leagrave (18:41)
Harlington (18:46)
Flitwick (18:50)
Bedford (19:05)

Thameslink (8 coaches)

1 On time
16:56 Eastbourne

CALLING AT:

Haywards Heath (17:07)
Wivelsfield (17:11)
Plumpton (17:19)
Cooksbridge (17:23)
Lewes (17:28)
Polegate (17:41)
Hampden Park (17:47)
Eastbourne (17:52)

Southern (8 coaches)

7 On time
16:56 London Victoria

CALLING AT:

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

Southern (12 coaches)

4 On time
16:59 Reading

CALLING AT:

Redhill (17:07)
Reigate (17:14)
Dorking Deepdene (17:22)
Gomshall (17:30)
Chilworth (17:37)
Guildford (17:44)
Ash (17:54)
North Camp (17:59)
Farnborough North (18:03)
Blackwater (18:08)
Sandhurst (18:12)
Crowthorne (18:16)
Wokingham (18:22)
Reading (18:32)

Great Western Railway

2 On time
17:01 Brighton

CALLING AT:

Haywards Heath (17:11)
Burgess Hill (17:18)
Hassocks (17:22)
Preston Park (17:29)
Brighton (17:35)

Gatwick Express (8 coaches)

6 On time
17:02 Bedford

CALLING AT:

Horley (17:05)
Salfords (17:09)
Earlswood (Surrey) (17:12)
Redhill (17:16)
Purley (17:26)
South Croydon (17:30)
East Croydon (17:33)
Norwood Junction (17:37)
London Bridge (17:50)
London Blackfriars (17:56)
City Thameslink (17:58)
Farringdon (18:01)
London St Pancras (Intl) (18:05)
St Albans (18:25)
Harpenden (18:31)
Luton (18:37)
Leagrave (18:42)
Bedford (18:58)

Thameslink (12 coaches)

1 On time
17:02 London Victoria

CALLING AT:

East Croydon (17:18)
Clapham Junction (17:28)
London Victoria (17:36)

Southern (8 coaches)

5 On time