dleger / currency_converter
A simple script for converting currencies
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/dleger/currency_converter
Requires
- php: >=5.3.0
- gilbitron/php-simplecache: 1.*
This package is not auto-updated.
Last update: 2025-10-25 23:48:11 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
?>