Getting daily data on exchange rates, stock indexes e t.c. via CBR web services.
Getting daily data on exchange rates, stock indexes e t.c. via CBR web services, (*1)
http://www.cbr.ru/scripts/Root.asp?PrtId=DWS, (*2)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist robote13/yii2-cbr-webservices "*"
or add, (*5)
"robote13/yii2-cbr-webservices": "*"
to the require section of your composer.json
file., (*6)
Once the extension is installed, simply use it in your code by :, (*7)
$service = new \robote13\CBRwebservice\CBRServicesAPI(CBRService::SERVICE_DAYINFO); $xml = $service->getData('CursOnDate',['On_date'=>$date]));
Also, for access to the service method can be used implemented wrapper-methods :, (*8)
$service = new \robote13\CBRwebservice\CBRServicesAPI(CBRService::SERVICE_DAYINFO); $xml = $service->exchangeRates();