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

  • Trains running between Luton and London St Pancras International may be delayed by up to 20 minutes, cancelled or revised. Latest information can be found in Status and Disruptions.

  • Trains running to and from Eastbourne may be delayed by up to 10 minutes. Latest information can be found in Status and Disruptions.

Time Destination Platform Expected
18:11 Three Bridges

CALLING AT:

Three Bridges (18:16)

Thameslink (12 coaches)

3 18:38
18:22 Three Bridges

CALLING AT:

Lingfield (18:27)
Three Bridges (18:28)
Dormans (18:30)
East Grinstead (18:36)

Thameslink

  18:47
18:31 Brighton

CALLING AT:

Haywards Heath (18:41)
Burgess Hill (18:48)
Hassocks (18:52)
Preston Park (18:59)
Brighton (19:04)

Gatwick Express (8 coaches)

6 18:34
18:32 Luton   Cancelled
18:33 London Victoria

CALLING AT:

East Croydon (18:48)
Clapham Junction (18:58)
London Victoria (19:06)

Southern (8 coaches)

4 18:38
18:36 Bedford

CALLING AT:

East Croydon (18:51)
London Bridge (19:05)
London Blackfriars (19:11)
City Thameslink (19:13)
Farringdon (19:16)
London St Pancras (Intl) (19:20)
St Albans (19:39)
Harpenden (19:45)
Luton (19:51)
Flitwick (20:02)
Bedford (20:15)

Thameslink (12 coaches)

4 On time
18:36 Brighton

CALLING AT:

Three Bridges (18:40)
Balcombe (18:47)
Haywards Heath (18:52)
Wivelsfield (18:57)
Burgess Hill (18:59)
Hassocks (19:03)
Preston Park (19:10)
Brighton (19:15)

Thameslink (12 coaches)

6 18:52
18:39 Portsmouth Harbour and Bognor Regis

CALLING AT:

Three Bridges (18:44)
Crawley (18:48)
Ifield (18:51)
Littlehaven (18:57)
Horsham (19:01)
Barnham (19:34)
Chichester (19:42)
Fishbourne (West Sussex) (19:46)
Bosham (19:49)
Nutbourne (19:53)
Southbourne (19:55)
Emsworth (19:59)
Warblington (20:02)
Havant (20:04)
Hilsea (20:11)
Fratton (20:15)
Portsmouth & Southsea (20:18)
Portsmouth Harbour (20:22)

Train divides at Horsham

CALLING AT:

Christs Hospital (19:12)
Billingshurst (19:18)
Pulborough (19:25)
Amberley (19:32)
Arundel (19:37)
Ford (19:43)
Barnham (19:48)
Bognor Regis (19:55)

Southern (12 coaches)

7 18:41
18:40 London Victoria

CALLING AT:

London Victoria (19:11)

Gatwick Express (8 coaches)

5 On time
18:41 Three Bridges   Cancelled