PHP code example of kurstoday / api

1. Go to this page and download the library: Download kurstoday/api 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/ */

    

kurstoday / api example snippets



use kurstoday\Kurstoday; // подключаем класс

$api = new Kurstoday; // создаем экземпляр класса

 $lutskService = $api->getService('lutsk'); 

 $kharkivAverage = $api->getAverage('kharkiv'); 
`
[
    [usd] => [
        [buy] => 26.78
        [sel] => 26.88
    ],
    [eur] => [
        [buy] => 28.81
        [sel] => 29.00
    ],
    [rur] => [
        [buy] => 01.93
        [sel] => 00.36
    ],
    ... и так дальше ...
]