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
02:31 Three Bridges

CALLING AT:

Three Bridges (02:36)

Thameslink (12 coaches)

2 On time
02:45 Bedford

CALLING AT:

Horley (02:48)
Purley (03:02)
East Croydon (03:09)
London Blackfriars (03:35)
London St Pancras (Intl) (03:43)
Kentish Town (03:48)
West Hampstead Thameslink (03:52)
Cricklewood (03:55)
Brent Cross West (03:58)
Hendon (04:00)
Mill Hill Broadway (04:03)
Elstree & Borehamwood (04:07)
Radlett (04:12)
St Albans (04:18)
Harpenden (04:25)
Luton Airport Parkway (04:30)
Luton (04:34)
Leagrave (04:39)
Harlington (04:44)
Flitwick (04:48)
Bedford (04:59)

Thameslink

1 On time
03:31 Three Bridges

CALLING AT:

Three Bridges (03:36)

Thameslink

2 On time
03:45 Bedford

CALLING AT:

Horley (03:48)
Purley (04:02)
East Croydon (04:09)
London Blackfriars (04:35)
London St Pancras (Intl) (04:43)
Kentish Town (04:48)
West Hampstead Thameslink (04:52)
Cricklewood (04:55)
Brent Cross West (04:58)
Hendon (05:00)
Mill Hill Broadway (05:03)
Elstree & Borehamwood (05:07)
Radlett (05:12)
St Albans (05:18)
Harpenden (05:25)
Luton Airport Parkway (05:30)
Luton (05:34)
Leagrave (05:39)
Harlington (05:44)
Flitwick (05:48)
Bedford (05:59)

Thameslink

1 On time