PHP code example of kaadon / currency_layer

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

    

kaadon / currency_layer example snippets


use Kaadon\CurrencyLayer\RealTimeRates;
$accessKey = 'c95f0bacbe3fa8436c018ac977fdfe8d';
$currencyLayer = new RealTimeRates($accessKey,"USD");
$response = $currencyLayer->getRates('CNY,EUR,DZD,LKR,GBP,AUD,AWG,AZN');