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
09:26 Ore

CALLING AT:

Haywards Heath (09:37)
Wivelsfield (09:42)
Plumpton (09:49)
Lewes (09:56)
Polegate (10:09)
Eastbourne (10:17)
Hampden Park (10:27)
Pevensey & Westham (10:32)
Normans Bay (10:37)
Cooden Beach (10:42)
Collington (10:45)
Bexhill (10:48)
St Leonards Warrior Square (10:55)
Hastings (10:58)
Ore (11:02)

Southern (8 coaches)

7 09:29
09:30 Reading

CALLING AT:

Redhill (09:40)
Reigate (09:49)
Betchworth (09:54)
Dorking Deepdene (09:58)
Dorking West (10:02)
Shalford (10:15)
Guildford (10:21)
North Camp (10:40)
Blackwater (10:47)
Wokingham (10:55)
Reading (11:04)

Great Western Railway

2 On time
09:31 Brighton

CALLING AT:

Haywards Heath (09:41)
Brighton (09:57)

Gatwick Express (8 coaches)

6 On time
09:32 Bedford

CALLING AT:

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

Thameslink (12 coaches)

1 On time
09:32 London Victoria

CALLING AT:

East Croydon (09:48)
Clapham Junction (09:58)
London Victoria (10:06)

Southern (8 coaches)

5 On time
09:35 Brighton

CALLING AT:

Three Bridges (09:39)
Balcombe (09:46)
Haywards Heath (09:51)
Wivelsfield (09:56)
Burgess Hill (09:58)
Hassocks (10:02)
Preston Park (10:08)
Brighton (10:13)

Thameslink (12 coaches)

7 On time
09:35 Three Bridges

CALLING AT:

Three Bridges (09:40)

Thameslink (12 coaches)

3 On time
09:36 Bedford

CALLING AT:

East Croydon (09:51)
London Bridge (10:05)
London Blackfriars (10:11)
City Thameslink (10:13)
Farringdon (10:16)
London St Pancras (Intl) (10:20)
West Hampstead Thameslink (10:29)
St Albans (10:41)
Harpenden (10:47)
Luton Airport Parkway (10:53)
Luton (10:57)
Leagrave (11:01)
Harlington (11:06)
Flitwick (11:10)
Bedford (11:24)

Thameslink (12 coaches)

4 On time
09:39 Portsmouth Harbour and Bognor Regis

CALLING AT:

Three Bridges (09:44)
Crawley (09:48)
Horsham (09:57)
Barnham (10:29)
Chichester (10:37)
Fishbourne (West Sussex) (10:41)
Bosham (10:44)
Nutbourne (10:48)
Southbourne (10:51)
Emsworth (10:54)
Warblington (10:57)
Havant (10:59)
Hilsea (11:08)
Fratton (11:12)
Portsmouth & Southsea (11:16)
Portsmouth Harbour (11:20)

Train divides at Horsham

CALLING AT:

Christs Hospital (10:09)
Billingshurst (10:15)
Pulborough (10:22)
Amberley (10:28)
Arundel (10:32)
Ford (10:38)
Barnham (10:43)
Bognor Regis (10:51)

Southern (12 coaches)

6 On time
09:40 London Victoria

CALLING AT:

London Victoria (10:11)

Gatwick Express (8 coaches)

5 On time