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

  • Hot weather to affect some Great Western Railway services. Please check before you travel. Latest information can be found in Status and Disruptions.
Time Destination Platform Expected
23:15 Bognor Regis

CALLING AT:

Three Bridges (23:19)
Crawley (23:23)
Horsham (23:32)
Christs Hospital (23:37)
Billingshurst (23:43)
Pulborough (23:49)
Amberley (23:55)
Arundel (23:59)
Ford (00:05)
Barnham (00:10)
Bognor Regis (00:18)

Southern (8 coaches)

3 23:33
23:23 Bedford

CALLING AT:

East Croydon (23:39)
London Blackfriars (00:06)
Farringdon (00:10)
London St Pancras (Intl) (00:15)
Kentish Town (00:20)
West Hampstead Thameslink (00:24)
Cricklewood (00:27)
Brent Cross West (00:30)
Hendon (00:32)
Mill Hill Broadway (00:35)
Elstree & Borehamwood (00:39)
Radlett (00:43)
St Albans (00:49)
Harpenden (00:56)
Luton Airport Parkway (01:02)
Luton (01:06)
Leagrave (01:11)
Harlington (01:15)
Flitwick (01:19)
Bedford (01:33)

Thameslink (12 coaches)

4 23:29
23:26 Three Bridges

CALLING AT:

Three Bridges (23:31)

Thameslink (12 coaches)

3 23:31
23:39 London Victoria

CALLING AT:

Horley (23:41)
Redhill (23:49)
Merstham (23:54)
Coulsdon South (23:59)
Purley (00:02)
East Croydon (00:08)
Clapham Junction (00:21)
London Victoria (00:29)

Southern (4 coaches)

2 23:45
23:45 London Victoria

CALLING AT:

Redhill (23:54)
East Croydon (00:11)
Clapham Junction (00:25)
London Victoria (00:32)

Southern (8 coaches)

2 On time
23:47 Three Bridges

CALLING AT:

Three Bridges (23:51)

Thameslink (12 coaches)

3 On time
23:50 Horsham

CALLING AT:

Three Bridges (23:54)
Crawley (23:59)
Ifield (00:02)
Littlehaven (00:08)
Horsham (00:11)

Thameslink (12 coaches)

3 23:54
23:52 Bedford

CALLING AT:

East Croydon (00:14)
London Blackfriars (00:40)
London St Pancras (Intl) (00:47)
Kentish Town (00:52)
West Hampstead Thameslink (00:56)
Cricklewood (00:59)
Brent Cross West (01:02)
Hendon (01:04)
Mill Hill Broadway (01:07)
Elstree & Borehamwood (01:11)
Radlett (01:15)
St Albans (01:21)
Harpenden (01:28)
Luton Airport Parkway (01:34)
Luton (01:38)
Leagrave (01:43)
Harlington (01:47)
Flitwick (01:51)
Bedford (02:03)

Thameslink (12 coaches)

1 On time
23:54 Horsham

CALLING AT:

Three Bridges (23:58)
Crawley (00:03)
Ifield (00:06)
Littlehaven (00:12)
Horsham (00:15)

Southern (12 coaches)

3 On time
23:58 Three Bridges

CALLING AT:

Three Bridges (00:03)

Southern (4 coaches)

3 On time