dleger / currency_converter
A simple script for converting currencies
dev-master
2015-06-15 11:48 UTC
Requires
- php: >=5.3.0
- gilbitron/php-simplecache: 1.*
This package is not auto-updated.
Last update: 2025-03-29 20:48:19 UTC
README
This PHP class converts currencies. Not all currencies are supported, but major ones are.
Installation
using composer:
composer require dleger/currency_converter:dev-master
How to use it
<?php
require_once('vendor/autoload.php');
use dleger\currency_converter\currency_converter;
$conversion = new currency_converter(FALSE, '', '');
echo $conversion->convert('GBP', 'EUR', 100);
?>
You can also have a cache functionnality:
replace:
<?php
$conversion = new currency_converter(FALSE, '', '');
?>
by:
<?php
$conversion = new currency_converter(TRUE, 'your/cache/folder', 3600); // 3600 is the expiry time
?>