- Notifications
You must be signed in to change notification settings - Fork5
License
lotfio/vstat
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
- PHP 7.2 or newer versions
- PHPUnit >= 8 (for testing purpose)
- Easy to use.
- Simple installation one line command with composer.
- Get all Vatsim Data.
- Get VATSIM servers data.
- Get clients data.
- Cache data to speed up the loading process.
composer require lotfio/vstat
useVstat\Vstat;require'vendor/autoload.php';print_r(Vstat::getClients());
Config file is located insideVstat/config/app.php
where you can change vatsim data url, cache time and cache location.
By defaultVSTAT is generating data each 5 minutes fromhttp://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 updatevatsim-data.txt
file every minutewhich 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 clientsprint_r((Vstat::getClients()));// get prefile plansprint_r((Vstat::getPreFile()));// get vatsim serversprint_r((Vstat::getServers()));// get vatsim voice serversprint_r((Vstat::getVoiceServers()));// filters// show by Type ATC or PILOT by default show by PILOTprint_r((Vstat::showByType('ATC')));// show by airlineprint_r((Vstat::showByAirline('BAW')));// show by callsignprint_r((Vstat::showByCallsign('BAW96')));// show by vatsim idprint_r((Vstat::showByVatsimId(131)));// get number of pilotsprint_r((Vstat::getNumberOfPilots()));// get number of controllersprint_r((Vstat::getNumberOfControllers()));// get number of clients connected with the same airlineechocount(Vstat::showByAirline('DAH'));// get data as json formtprint_r(json_encode(Vstat::showByAirline('DAH')));
- Thank you for considering to contribute to Ouch. All the contribution guidelines are mentionedhere.
- Here you can find theChangeLog.
- ShareVSTAT and lets get more stars and more contributors.
- If this project helped you reduce time to develop, you can give me a cup of coffee :) :Paypal. 💖
- VSTAT is an open-source software licensed under theMIT license.