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.
  • Trains running in the Havant area may be delayed by up to 30 minutes, revised or cancelled. Latest information can be found in Status and Disruptions.

Time Destination Platform Expected
21:19 Peterborough

CALLING AT:

Horley (21:21)
Redhill (21:29)
Merstham (21:33)
Coulsdon South (21:38)
East Croydon (21:45)
London Bridge (22:00)
London Blackfriars (22:06)
City Thameslink (22:08)
Farringdon (22:11)
London St Pancras (Intl) (22:15)
Finsbury Park (22:22)
Stevenage (22:43)
Hitchin (22:50)
Arlesey (22:56)
Biggleswade (23:01)
Sandy (23:05)
St Neots (23:12)
Huntingdon (23:19)
Peterborough (23:37)

Thameslink (12 coaches)

1 On time
21:20 Littlehampton

CALLING AT:

Three Bridges (21:24)
Haywards Heath (21:33)
Burgess Hill (21:39)
Hassocks (21:43)
Preston Park (21:50)
Hove (21:53)
Portslade (21:57)
Southwick (22:00)
Shoreham-by-Sea (22:03)
Lancing (22:08)
Worthing (22:12)
West Worthing (22:14)
Durrington-on-Sea (22:17)
Goring-by-Sea (22:20)
Angmering (22:24)
Littlehampton (22:34)

Southern (12 coaches)

6 21:21
21:26 London Victoria

CALLING AT:

East Croydon (21:41)
Clapham Junction (21:51)
London Victoria (21:58)

Southern (8 coaches)

4 On time
21:26 Ore

CALLING AT:

Haywards Heath (21:37)
Wivelsfield (21:42)
Plumpton (21:49)
Lewes (21:56)
Polegate (22:09)
Eastbourne (22:17)
Hampden Park (22:31)
Pevensey & Westham (22:37)
Cooden Beach (22:44)
Collington (22:47)
Bexhill (22:49)
St Leonards Warrior Square (22:56)
Hastings (22:59)
Ore (23:03)

Southern (8 coaches)

7 On time
21:30 Reading

CALLING AT:

Redhill (21:38)
Reigate (21:50)
Betchworth (21:55)
Dorking Deepdene (21:59)
Dorking West (22:02)
Gomshall (22:10)
Chilworth (22:17)
Shalford (22:20)
Guildford (22:26)
Ash (22:37)
North Camp (22:41)
Farnborough North (22:45)
Blackwater (22:49)
Sandhurst (22:53)
Crowthorne (22:57)
Wokingham (23:02)
Reading (23:16)

Great Western Railway (2 coaches)

2 On time
21:31 Brighton

CALLING AT:

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

Gatwick Express (4 coaches)

6 On time
21:32 London Victoria

CALLING AT:

East Croydon (21:48)
Clapham Junction (21:58)
London Victoria (22:06)

Southern (8 coaches)

5 On time
21:35 Brighton

CALLING AT:

Three Bridges (21:39)
Balcombe (21:46)
Haywards Heath (21:51)
Wivelsfield (21:56)
Burgess Hill (21:58)
Hassocks (22:02)
Preston Park (22:08)
Brighton (22:14)

Thameslink (12 coaches)

7 21:44
21:36 Bedford

CALLING AT:

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

Thameslink (12 coaches)

4 On time
21:39 Portsmouth & Southsea and Bognor Regis

CALLING AT:

Three Bridges (21:44)
Crawley (21:48)
Horsham (21:57)
Barnham (22:30)
Chichester (22:38)
Fishbourne (West Sussex) (22:42)
Bosham (22:45)
Nutbourne (22:49)
Southbourne (22:51)
Emsworth (22:54)
Warblington (22:57)
Havant (22:59)
Fratton (23:08)
Portsmouth & Southsea (23:13)

Train divides at Horsham

CALLING AT:

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

Southern (12 coaches)

6 On time