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

  • Temporary changes to weekday off-peak services between Ore / Eastbourne and London Victoria. Latest information can be found in the Disruptions area of the National Rail website.
  • Southern service between Norwood Junction / Crystal Palace and New Cross Gate may be delayed or revised. Latest information can be found in the Disruptions area of the National Rail website.
  • Thameslink trains between St Albans City and West Hampstead Thameslink may be cancelled, delayed or revised. More details can be found in the Disruptions area of the National Rail website.

Time Destination Platform Expected
07:49 Peterborough

CALLING AT:

Horley (07:51)
Redhill (07:59)
Merstham (08:03)
Coulsdon South (08:08)
East Croydon (08:15)
London Bridge (08:30)
London Blackfriars (08:36)
City Thameslink (08:38)
Farringdon (08:41)
London St Pancras (Intl) (08:45)
Finsbury Park (08:52)
Stevenage (09:13)
Hitchin (09:20)
Arlesey (09:26)
Biggleswade (09:31)
Sandy (09:35)
St Neots (09:42)
Huntingdon (09:50)
Peterborough (10:08)

Thameslink (8 coaches)

2 08:15
08:09 Portsmouth Harbour and Bognor Regis

CALLING AT:

Three Bridges (08:14)
Crawley (08:18)
Horsham (08:27)
Barnham (09:01)
Chichester (09:11)
Southbourne (09:18)
Emsworth (09:21)
Havant (09:26)
Hilsea (09:32)
Fratton (09:36)
Portsmouth & Southsea (09:40)
Portsmouth Harbour (09:44)

Train divides at Horsham

CALLING AT:

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

Southern (8 coaches)

6 On time
08:10 London Victoria

CALLING AT:

London Victoria (08:41)

Gatwick Express (8 coaches)

5 On time
08:13 London Victoria

CALLING AT:

East Croydon (08:28)
Clapham Junction (08:37)
London Victoria (08:45)

Southern (12 coaches)

2 On time
08:15 Brighton

CALLING AT:

Three Bridges (08:19)
Haywards Heath (08:29)
Burgess Hill (08:35)
Brighton (08:48)

Thameslink (12 coaches)

7 On time
08:16 Cambridge

CALLING AT:

East Croydon (08:31)
London Bridge (08:45)
London Blackfriars (08:51)
City Thameslink (08:53)
Farringdon (08:56)
London St Pancras (Intl) (09:00)
Finsbury Park (09:07)
Stevenage (09:28)
Hitchin (09:34)
Letchworth Garden City (09:39)
Baldock (09:43)
Ashwell & Morden (09:48)
Royston (09:52)
Cambridge South (10:05)
Cambridge (10:09)

Thameslink (12 coaches)

4 On time
08:17 Horsham

CALLING AT:

Three Bridges (08:22)
Crawley (08:27)
Ifield (08:30)
Faygate (08:34)
Littlehaven (08:38)
Horsham (08:42)

Thameslink (12 coaches)

3 On time
08:19 Peterborough

CALLING AT:

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

Thameslink (12 coaches)

2 On time
08:22 Littlehampton

CALLING AT:

Haywards Heath (08:32)
Burgess Hill (08:39)
Hassocks (08:43)
Preston Park (08:50)
Hove (08:54)
Portslade (08:57)
Shoreham-by-Sea (09:02)
Lancing (09:07)
Worthing (09:11)
West Worthing (09:14)
Durrington-on-Sea (09:16)
Goring-by-Sea (09:19)
Angmering (09:24)
Littlehampton (09:34)

Southern (8 coaches)

6 On time
08:22 London Victoria

CALLING AT:

Horley (08:25)
Salfords (08:29)
Earlswood (Surrey) (08:32)
Redhill (08:36)
Merstham (08:44)
Coulsdon South (08:49)
Purley (08:53)
East Croydon (08:59)
Clapham Junction (09:11)
London Victoria (09:19)

Southern (4 coaches)

1 On time