1. Go to this page and download the library: Download paulhollmann/vatsim-data 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/ */
paulhollmann / vatsim-data example snippets
Datafeed::FetchedAt(); // Package fetch time for the VATSIM datafeed
Datafeed::UpdatedAt(); // VATSIM's own timestamp within the datafeed
Statusfile::FetchedAt(); // VATSIM status file
TransceiverData::FetchedAt(); // Transceiver feed
Metar::FetchedAt('EDDF'); // METAR for one ICAO code
StandStatus::OSMFetchedAt('EDDF'); // OSM stand data for one ICAO code
use VatsimData\Metar;
use VatsimData\TransceiverData;
$atis = Datafeed::AtisAerodrome('EDDF');
$metar = Metar::get('EDDF');
$owner = TransceiverData::Owner('EDDF_N_TWR');
$transceivers = $owner?->transceivers ?? [];
use VatsimData\StandStatus;
$stands = new StandStatus(51.148056, -0.190278);
$stands->loadStandDataFromArray([
['43N', 51.15712, -0.17373],
['43W', 51.15712, -0.17373],
])->parseData();
foreach ($stands->occupiedStands() as $stand) {
echo $stand->getName().' '.$stand->occupier->callsign;
}
$stands = new StandStatus(
50.033333,
8.570556,
StandStatus::COORD_FORMAT_DECIMAL,
'EDDF',
364, // aerodrome elevation in feet MSL
);
// Or configure it after construction:
$stands->setAerodromeElevation(364);