Giter Site home page Giter Site logo

vstat's Introduction

Vstat Preview

License PHP version Version Coverage Build Status StyleCi

โœˆ๏ธ 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)

๐Ÿ‘Œ 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

โœ๏ธ Use it :

use Vstat\Vstat;

require 'vendor/autoload.php';

print_r(Vstat::getClients());

๐Ÿ”ง 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).

๐Ÿ“ฅ Available methods :

// 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')));

๐Ÿ’ป Contributing

  • Thank you for considering to contribute to Ouch. All the contribution guidelines are mentioned here.

๐Ÿ“ƒ ChangeLog

๐Ÿบ 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. ๐Ÿ’–

๐Ÿ“‹ License

  • VSTAT is an open-source software licensed under the MIT license.

vstat's People

Contributors

lotfio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.