Jump to content

Current Flights Code V1.0


Recommended Posts

Posted

Hi All,

So many people have been asking me for this after it's been on my site.Displays a small text-based output that shows the pilots callsign and name. You can adapt as you wish.

PLEASE NOTE: The code may not be as short as it could be, just as long as that because I edited it from the live flights board.

Enjoy!

Jon

<?php
$results = ACARSData::GetACARSData();
if (count($results) > 0)
  {
  foreach($results as $flight)
     { 
       if($flight->client == 'FSACARS')
       {$plane = OperationsData::getAircraftInfo($flight->aircraft);}
       else
       {$plane = OperationsData::getAircraftByReg($flight->aircraft);}
        ?>
  <?php echo $flight->flightnum;?> - <?php echo $flight->pilotname;?> <br/>
    <?php
         }
           } else { ?>
               No Flights in Progress!
           <?php
           }
           ?>

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...