PHP code example of mivek / php-metar-taf-parser
1. Go to this page and download the library: Download mivek/php-metar-taf-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mivek / php-metar-taf-parser example snippets
$code = "LFBG 081130Z AUTO 23012KT 9999 SCT022 BKN072 BKN090 22/16 Q1011 TEMPO 26015G25KT 3000 TSRA SCT025CB BKN050";
$metarParser = new \PHPMetarTafParser\Parser\MetarParser();
$metar = $metarParser->parse($code);
$code = "TAF LSZH 292025Z 2921/3103 VRB03KT 9999 FEW020 BKN080 TX20/3014Z TN06/3003Z " .
"PROB30 TEMPO 2921/2923 SHRA " .
"BECMG 3001/3004 4000 MIFG NSC " .
"PROB40 3003/3007 1500 BCFG SCT004 " .
"PROB30 3004/3007 0800 FG VV003 " .
"BECMG 3006/3009 9999 FEW030 " .
"PROB40 TEMPO 3012/3017 30008KT";
$tafParser = new \PHPMetarTafParser\Parser\TAFParser();
$taf = $tafParser->parse($code);
composer