PHP code example of peso / openexchangerates-service
1. Go to this page and download the library: Download peso/openexchangerates-service 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/ */
peso / openexchangerates-service example snippets
use Peso\Peso\CurrencyConverter;
use Peso\Services\OpenExchangeRatesService;
use Peso\Services\OpenExchangeRatesService\AppType;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Psr16Cache;
26
echo $converter->convert('12500', 'USD', 'EUR', 2), PHP_EOL;
bash
composer install peso/openexchangerates-service php-http/discovery guzzlehttp/guzzle symfony/cache