| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
✈️ PHP Vatsim statistics package.
VSTAT is a simple lightweight PHP MIT Package developed by Lotfio Lakehal That helps you to get VATSIM statistics and data in simple clean and easy way.
composer require lotfio/vstat
use Vstat\Vstat;
require 'vendor/autoload.php';
print_r(Vstat::getClients());Config file is located inside Vstat/config/app.php where you can change vatsim data url, cache time and cache location.
By default VSTAT is generating data each 5 minutes from http://vatsim-data.hardern.net/vatsim-data.txt You can change the time of data loading to 2 - 3 minutes. Recommended I recommend that you create a cron job on your host and update vatsim-data.txt file every minute which will highly increase the loading speed of you application. (if you do so make sure to keep php cache time higher than the cron job).
// get all vatsim clients
print_r((Vstat::getClients()));
// get prefile plans
print_r((Vstat::getPreFile()));
// get vatsim servers
print_r((Vstat::getServers()));
// get vatsim voice servers
print_r((Vstat::getVoiceServers()));
// filters
// show by Type ATC or PILOT by default show by PILOT
print_r((Vstat::showByType('ATC')));
// show by airline
print_r((Vstat::showByAirline('BAW')));
// show by callsign
print_r((Vstat::showByCallsign('BAW96')));
// show by vatsim id
print_r((Vstat::showByVatsimId(131)));
// get number of pilots
print_r((Vstat::getNumberOfPilots()));
// get number of controllers
print_r((Vstat::getNumberOfControllers()));
// get number of clients connected with the same airline
echo count(Vstat::showByAirline('DAH'));
// get data as json formt
print_r(json_encode(Vstat::showByAirline('DAH')));| Back | FazBrowse Home | New Git URL |