lotfio/vstat 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lotfio/vstat

Composer 安装命令:

composer require lotfio/vstat

包简介

Vatsim statistics PHP API

README 文档

README

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.

统计信息

  • 总下载量: 57
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固