PHP code example of iansltx / flightaware-php-client

1. Go to this page and download the library: Download iansltx/flightaware-php-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iansltx / flightaware-php-client example snippets


composer 

$faClient = new iansltx\FlightAwareClient\Client('username', 'api_key');

$inFlightInfo = $faClient->inFlightInfo($ident); // reformats waypoints with distinct latitude and longitude array keys
$flightInfoEx = $faClient->flightInfoEx($ident, $how_many, $offset);
$flightId = $faClient->getFlightId($ident, $departure_time);
$historicalTrack = $faClient->getHistoricalTrack($flight_id);
$lastTrack = $faClient->getLastTrack($ident);
$endpoint = $faClient->registerAlertEndpoint($url,$format);
$getAlertResults = $faClient->getAlerts()
$newAlertID = $faClient->setAlert($alert_id, $ident, $origin, $destination, $aircrafttype, $date_start, $date_end, $channels, $enablede, $max_weekly);
$foo = $faClient->deleteAlert($alert_id);