PHP code example of mibo / currency-rates

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

    

mibo / currency-rates example snippets


$price = 100; // EUR
$exchanger = new \MiBo\Currency\Rates\Exchangers\ECB();
$newPrice = $exchanger->getRateFor('USD') * $price; // USD