PHP code example of progjp / nbu-currency-api

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

    

progjp / nbu-currency-api example snippets


$client = new CurrencyApiClient();
$client->getCurrencyRate();

$client = new CurrencyApiClient();
$client->getCurrencyRate(null, new DateTime());

$client = new CurrencyApiClient();
$client->getCurrencyRate('USD', new DateTime());