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 to / from London Victoria may be cancelled, delayed by up to 15 minutes or revised. More details and the full impact to your journey can be found in Status and Disruptions.
  • Trains running between Luton and London St Pancras International may be cancelled, delayed by up to 30 minutes or revised. Latest information can be found in Status and Disruptions.
Time Destination Platform Expected
17:56 Eastbourne

CALLING AT:

Haywards Heath (18:07)
Wivelsfield (18:11)
Cooksbridge (18:21)
Lewes (18:26)
Glynde (18:32)
Berwick (Sussex) (18:38)
Polegate (18:43)
Hampden Park (18:48)
Eastbourne (18:53)

Southern (12 coaches)

7 17:59
17:56 London Victoria

CALLING AT:

East Croydon (18:11)
Clapham Junction (18:21)
London Victoria (18:28)

Southern (8 coaches)

4 On time
17:59 Brighton

CALLING AT:

Haywards Heath (18:11)
Burgess Hill (18:18)
Hassocks (18:22)
Preston Park (18:29)
Brighton (18:35)

Gatwick Express (8 coaches)

6 18:01
17:59 Reading

CALLING AT:

Redhill (18:07)
Reigate (18:14)
Dorking Deepdene (18:22)
Gomshall (18:30)
Chilworth (18:37)
Guildford (18:44)
Ash (18:54)
North Camp (18:59)
Farnborough North (19:03)
Blackwater (19:07)
Sandhurst (19:11)
Crowthorne (19:15)
Wokingham (19:21)
Reading (19:30)

Great Western Railway

2 On time
18:02 Bedford

CALLING AT:

Horley (18:05)
Salfords (18:09)
Earlswood (Surrey) (18:12)
Redhill (18:16)
Purley (18:26)
South Croydon (18:30)
East Croydon (18:33)
Norwood Junction (18:37)
London Bridge (18:50)
London Blackfriars (18:56)
City Thameslink (18:58)
Farringdon (19:01)
London St Pancras (Intl) (19:05)
West Hampstead Thameslink (19:14)
St Albans (19:29)
Harpenden (19:35)
Luton Airport Parkway (19:40)
Luton (19:44)
Leagrave (19:49)
Harlington (19:53)
Flitwick (19:57)
Bedford (20:11)

Thameslink (12 coaches)

1 On time
18:02 London Victoria

CALLING AT:

East Croydon (18:18)
Clapham Junction (18:28)
London Victoria (18:36)

Southern (8 coaches)

5 On time
18:06 Bedford

CALLING AT:

East Croydon (18:21)
London Bridge (18:35)
London Blackfriars (18:41)
City Thameslink (18:43)
Farringdon (18:46)
London St Pancras (Intl) (18:50)
West Hampstead Thameslink (18:59)
St Albans (19:11)
Harpenden (19:17)
Luton Airport Parkway (19:23)
Luton (19:27)
Leagrave (19:31)
Harlington (19:36)
Flitwick (19:40)
Bedford (19:54)

Thameslink (12 coaches)

4 On time
18:06 Brighton

CALLING AT:

Three Bridges (18:10)
Balcombe (18:17)
Haywards Heath (18:22)
Wivelsfield (18:27)
Burgess Hill (18:29)
Hassocks (18:33)
Preston Park (18:40)
Brighton (18:45)

Thameslink (12 coaches)

6 On time
18:09 Portsmouth Harbour and Bognor Regis

CALLING AT:

Three Bridges (18:14)
Crawley (18:18)
Horsham (18:27)
Barnham (18:59)
Chichester (19:07)
Southbourne (19:15)
Emsworth (19:18)
Havant (19:24)
Hilsea (19:31)
Fratton (19:35)
Portsmouth & Southsea (19:39)
Portsmouth Harbour (19:44)

Train divides at Horsham

CALLING AT:

Christs Hospital (18:39)
Billingshurst (18:45)
Pulborough (18:52)
Amberley (18:58)
Arundel (19:03)
Ford (19:09)
Barnham (19:13)
Bognor Regis (19:21)

Southern (12 coaches)

7 18:13
18:10 London Victoria

CALLING AT:

London Victoria (18:41)

Gatwick Express (8 coaches)

5 On time