Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lotfio/vstat
:airplane: PHP Vatsim statistics package :airplane:
https://github.com/lotfio/vstat
api fsx maps online-statistics p3d statistics vatsim vatsim-flight-map vattastatic
Last synced: 21 days ago
JSON representation
:airplane: PHP Vatsim statistics package :airplane:
- Host: GitHub
- URL: https://github.com/lotfio/vstat
- Owner: lotfio
- License: mit
- Created: 2018-11-28T20:48:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T14:02:08.000Z (over 2 years ago)
- Last Synced: 2024-04-22T19:20:45.603Z (7 months ago)
- Topics: api, fsx, maps, online-statistics, p3d, statistics, vatsim, vatsim-flight-map, vattastatic
- Language: PHP
- Homepage:
- Size: 241 KB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
:airplane: PHP Vatsim statistics package.
### 🔥 Introduction :
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.### 📌 Requirements :
- PHP 7.2 or newer versions
- PHPUnit >= 8 (for testing purpose)### :ok_hand: Features :
- 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.### 🚀 Installation & Use :
```
composer require lotfio/vstat
```### :pencil2: Use it :
```php
use Vstat\Vstat;require 'vendor/autoload.php';
print_r(Vstat::getClients());
```### :wrench: Config:
**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).### :inbox_tray: Available methods :
```php
// 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')));
```### :computer: Contributing
- Thank you for considering to contribute to Ouch. All the contribution guidelines are mentioned [here](CONTRIBUTE.md).
### :page_with_curl: ChangeLog
- Here you can find the [ChangeLog](CHANGELOG.md).
### :beer: Support the development
- Share ***VSTAT*** 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](https://www.paypal.me/lotfio)**. 💖### :clipboard: License
- ***VSTAT*** is an open-source software licensed under the [MIT license](LICENSE).