PHPackages                             ballen/metar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ballen/metar

ActiveLibrary[API Development](/categories/api)

ballen/metar
============

A PHP library to query aerodrome METAR information.

3.0.5(3y ago)10938↑233.3%2[1 issues](https://github.com/allebb/metar/issues)[1 PRs](https://github.com/allebb/metar/pulls)GPL-3.0-or-laterPHPPHP ^7.3|^8.0CI failing

Since Apr 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/allebb/metar)[ Packagist](https://packagist.org/packages/ballen/metar)[ RSS](/packages/ballen-metar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

Metar
=====

[](#metar)

[![Build](https://github.com/allebb/metar/workflows/build/badge.svg)](https://github.com/allebb/metar/actions)[![Code Coverage](https://camo.githubusercontent.com/4aef168b5ae282d4d8d409e0556d7a806c760c0876940444e6454a725bbb8f11/68747470733a2f2f636f6465636f762e696f2f67682f616c6c6562622f6d657461722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/allebb/metar)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c94d319a6efa4d92d70badda8730264b3af358ecaf649acbca0273e56309ab2a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c6c6562622f6d657461722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/allebb/metar/?branch=master)[![Code Climate](https://camo.githubusercontent.com/354734c8462a5bc387f0fb09a639e5e15990330d76625be9aae5f591cc43379c/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616c6c6562622f6d657461722f6261646765732f6770612e737667)](https://codeclimate.com/github/allebb/metar)[![Latest Stable Version](https://camo.githubusercontent.com/a3513fbc81784be359469b6e0089e2dc54e40e6f8df5beccc6a706c34dd6b63b/68747470733a2f2f706f7365722e707567782e6f72672f62616c6c656e2f6d657461722f762f737461626c65)](https://packagist.org/packages/ballen/metar)[![Latest Unstable Version](https://camo.githubusercontent.com/fc95a59fd86c1d40a85caf3071acb0e573aaeabfd6b919eb5a34a600b0eeb3ca/68747470733a2f2f706f7365722e707567782e6f72672f62616c6c656e2f6d657461722f762f756e737461626c65)](https://packagist.org/packages/ballen/metar)[![License](https://camo.githubusercontent.com/b7e284ed07388955126d34ab303c6fc257f9591b0097b65b7674bccd07b5a90f/68747470733a2f2f706f7365722e707567782e6f72672f62616c6c656e2f6d657461722f6c6963656e7365)](https://packagist.org/packages/ballen/metar)

A PHP library to query aerodrome METAR information, the library queries real-world METAR data direct from the National Oceanic and Atmospheric Administration (NOAA) and optionally for VATSIM or IVAO.

**The default provider that is configured by this library is NOAA, if you decide to change the provider to VATSIM or IVAO you SHOULD NOT use it for real-world METAR reports.**

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3.0
- cURL

This library is unit tested against PHP 7.3, 7.4, 8.0, 8.1 and 8.2!

If you need to use an older version of PHP, you should instead install the 2.x version of this library (see below for details).

License
-------

[](#license)

This client library is released under the [GPLv3](https://raw.githubusercontent.com/allebb/metar/master/LICENSE) license, you are welcome to use it, improve it and contribute your changes back!

Installation
------------

[](#installation)

The recommended way of installing this library is via. [Composer](http://getcomposer.org); To install using Composer type the following command at the console:

```
composer require ballen/metar
```

**If you need to use an older version of PHP, version 2.x.x supports PHP 5.6, 7.0, 7.1 and 7.2, you can install this version using Composer with this command instead:**

```
composer require ballen/metar ^2.0
```

Example usage
-------------

[](#example-usage)

```
use Ballen\Metar\Metar;

/**
 * Using the default options, the report will be retrieved from the NOAA web service.
 */
$egss = new Metar('EGSS');
echo sprintf('The METAR report for Stansted (EGSS) is: %s', $egss);

/**
 * Alternatively, Flight simulation enthusiasts may wish to retrieve the current VATSIM reports,
 * this can be achieved by changing the default provider like so:
 */
$egss->setProvider(Ballen\Metar\Providers\Vatsim::class);

/**
* Since version 2.1.0, users can now query the IVAO web service for METARs too by using the 'IVAO' provider method like so:
*/
$egss->setProvider(Ballen\Metar\Providers\Ivao::class);
```

Tests and coverage
------------------

[](#tests-and-coverage)

This library is fully unit tested using [PHPUnit](https://phpunit.de/).

I use [GitHub Actions](https://github.com/) for continuous integration, which triggers tests for PHP 7.3, 7.4, 8.0, 8.1 and 8.2 every time a commit is pushed.

If you wish to run the tests yourself you should run the following:

```
# Install the Metar Library (which will include PHPUnit as part of the require-dev dependencies)
composer install

# Now we run the unit tests (from the root of the project) like so:
./vendor/bin/phpunit
```

Code coverage can also be run and a report generated (this does require XDebug to be installed)...

```
./vendor/bin/phpunit --coverage-html ./report
```

Support
-------

[](#support)

I am happy to provide support via. my personal email address, so if you need a hand drop me an email at: ballen@bobbyallen.me.

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~272 days

Recently: every ~208 days

Total

13

Last Release

1130d ago

Major Versions

1.0.0 → 2.0.02016-01-30

2.1.4 → 3.0.02020-12-22

PHP version history (4 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.5.0

3.0.0PHP &gt;=7.3.0

3.0.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4729a376aa8281d9456a90c000e991aa605c96f15251469acd5a7a5c6cdde2e6?d=identicon)[allebb](/maintainers/allebb)

---

Top Contributors

[![allebb](https://avatars.githubusercontent.com/u/767628?v=4)](https://github.com/allebb "allebb (70 commits)")

---

Tags

aviationcloudmetarphppressurereportstempreturevisibilityweatherwindapiweatherICAOvatsimnoaaflightsimMETARpilotsivao

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ballen-metar/health.svg)

```
[![Health](https://phpackages.com/badges/ballen-metar/health.svg)](https://phpackages.com/packages/ballen-metar)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[gnahotelsolutions/laravel-weather

🌤️ A wrapper around Open Weather Map to get the current weather on a location.

385.3k](/packages/gnahotelsolutions-laravel-weather)[rugaard/weatherkit

Integrate Apple WeatherKit API into your project

111.4k](/packages/rugaard-weatherkit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
