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

Time Destination Platform Expected
04:31 Three Bridges

CALLING AT:

Three Bridges (04:36)

Thameslink (12 coaches)

2 On time
04:41 Bedford

CALLING AT:

Horley (04:44)
Redhill (04:52)
Purley (05:01)
East Croydon (05:08)
Norwood Junction (05:14)
London Bridge (05:26)
London Blackfriars (05:33)
City Thameslink (05:35)
Farringdon (05:38)
London St Pancras (Intl) (05:42)
West Hampstead Thameslink (05:53)
St Albans (06:05)
Harpenden (06:11)
Luton Airport Parkway (06:17)
Luton (06:21)
Leagrave (06:26)
Harlington (06:31)
Flitwick (06:35)
Bedford (06:47)

Thameslink (12 coaches)

1 On time
05:00 Brighton

CALLING AT:

Three Bridges (05:05)
Haywards Heath (05:15)
Brighton (05:35)

Thameslink (12 coaches)

2 On time
05:11 Reading

CALLING AT:

Redhill (05:20)
Reigate (05:34)
Dorking Deepdene (05:42)
Shalford (05:56)
Guildford (06:01)
Wanborough (06:10)
Ash (06:14)
North Camp (06:19)
Farnborough North (06:23)
Blackwater (06:28)
Sandhurst (06:32)
Crowthorne (06:36)
Wokingham (06:42)
Reading (06:53)

Great Western Railway

1 On time
05:19 Bedford

CALLING AT:

Redhill (05:28)
East Croydon (05:40)
London Bridge (05:54)
London Blackfriars (06:01)
City Thameslink (06:03)
Farringdon (06:06)
London St Pancras (Intl) (06:10)
West Hampstead Thameslink (06:19)
St Albans (06:35)
Harpenden (06:43)
Luton Airport Parkway (06:49)
Luton (06:53)
Leagrave (06:57)
Harlington (07:02)
Flitwick (07:06)
Bedford (07:20)

Thameslink (12 coaches)

1 On time
05:28 London Victoria

CALLING AT:

Horley (05:30)
Redhill (05:39)
Merstham (05:45)
Coulsdon South (05:50)
Purley (05:53)
East Croydon (06:00)
Clapham Junction (06:10)
London Victoria (06:19)

Southern

1 On time
05:32 Bedford

CALLING AT:

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

Thameslink (12 coaches)

1 On time
05:32 Brighton

CALLING AT:

Three Bridges (05:37)
Balcombe (05:44)
Haywards Heath (05:49)
Wivelsfield (05:54)
Burgess Hill (05:56)
Hassocks (06:00)
Preston Park (06:06)
Brighton (06:13)

Thameslink (12 coaches)

3 On time
05:40 London Victoria

CALLING AT:

London Victoria (06:12)

Gatwick Express

1 On time
05:46 Cambridge

CALLING AT:

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

Thameslink

4 On time