↓ 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

  • Delays between Three Bridges and East Croydon due to a problem with line-side equipment. More information can be found in Latest Travel News.
Time Destination Platform Expected
21:06 Brighton

CALLING AT:

Three Bridges (21:10)
Balcombe (21:17)
Haywards Heath (21:22)
Wivelsfield (21:27)
Burgess Hill (21:29)
Hassocks (21:33)
Preston Park (21:39)
Brighton (21:43)

Thameslink (12 coaches)

7 21:10
21:09 Bognor Regis

CALLING AT:

Three Bridges (21:14)
Crawley (21:18)
Horsham (21:27)
Christs Hospital (21:33)
Billingshurst (21:38)
Pulborough (21:43)
Amberley (21:47)
Arundel (21:51)
Ford (21:54)
Barnham (21:58)
Bognor Regis (22:06)
Chichester (22:06)
Fishbourne (West Sussex) (22:10)
Bosham (22:13)
Nutbourne (22:16)
Southbourne (22:19)
Emsworth (22:22)
Warblington (22:25)
Havant (22:28)
Cosham (22:35)
Portchester (22:40)
Fareham (22:45)
Swanwick (22:52)
Southampton Central (23:09)

Southern (12 coaches)

7 21:14
21:12 London Bridge

CALLING AT:

East Croydon (21:26)
London Bridge (21:44)

Southern (8 coaches)

2 21:22
21:17 Horsham

CALLING AT:

Three Bridges (21:22)
Crawley (21:26)
Ifield (21:29)
Littlehaven (21:35)
Horsham (21:39)

Thameslink (12 coaches)

3 On time
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)
Farringdon (22:11)
London St Pancras (Intl) (22:15)
Finsbury Park (22:22)
Stevenage (22:43)
Hitchin (22:49)
Arlesey (22:55)
Biggleswade (23:00)
Sandy (23:04)
St Neots (23:11)
Huntingdon (23:19)
Peterborough (23:39)

Thameslink (12 coaches)

2 On time
21:21 Littlehampton   Cancelled
21:24 London Bridge

CALLING AT:

East Croydon (21:39)
London Bridge (21:54)

Southern (8 coaches)

4 On time
21:28 Hastings

CALLING AT:

Haywards Heath (21:38)
Wivelsfield (21:43)
Plumpton (21:50)
Lewes (21:57)
Polegate (22:10)
Eastbourne (22:18)
Hampden Park (22:28)
Pevensey & Westham (22:33)
Cooden Beach (22:40)
Collington (22:43)
Bexhill (22:45)
St Leonards Warrior Square (22:52)
Hastings (22:55)

Southern (8 coaches)

7 On time
21:32 Bedford

CALLING AT:

Horley (21:34)
Salfords (21:39)
Earlswood (Surrey) (21:43)
Redhill (21:47)
Purley (21:57)
East Croydon (22:03)
Norwood Junction (22:07)
London Bridge (22:20)
London Blackfriars (22:26)
Farringdon (22:31)
London St Pancras (Intl) (22:35)
St Albans (22:59)
Harpenden (23:08)
Luton Airport Parkway (23:13)
Luton (23:16)
Leagrave (23:21)
Harlington (23:25)
Flitwick (23:29)
Bedford (23:41)

Thameslink (12 coaches)

1 On time
21:33 London Bridge

CALLING AT:

East Croydon (21:48)
London Bridge (22:11)

Southern (12 coaches)

4 On time