Parser Weather from Yandex Weather
git clone https://github.com/ignatenkovnikita/parserYandexWeather.git
cd parserYandexWeather
composer update
OR
composer require ignatenkovnikita/ya-weather
After this, run index.php from your web browser.
You can test program from this page
Simple usage
require_once($_SERVER['DOCUMENT_ROOT'] . '/parserYandexWeather/vendor/autoload.php');
use YaWeather\YaWeather;
$cityId = 27643; // List of Town https://pogoda.yandex.ru/static/cities.xml
$parser = new YaWeather($cityId);
$parser->load(); // load xml
$parser->show(); // get html as pogoda.yandex
$parser->logFormat(); // get error & success AS string
var_dump($parser->getResult()); // Get Object City with Cities
For unit testing just run command from root directory of the project:
vendor/bin/phpunit test\