Skip to content

A light weight PHP class that can convert two currencies using exchangerate.guru API.

License

Notifications You must be signed in to change notification settings

vajiralasantha/Simple-Currency-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple PHP Currency Converter

A light weight PHP class that can convert two currencies using exchangerate.guru API.

Usage:

Install via composer

"composer require vajiral/simple-currency-converter"

In your PHP file

<?php

use BigV\CurrencyCodes;
use BigV\CurrencyConverter;

require __DIR__ . "/../vendor/autoload.php";

$converter = new CurrencyConverter();
$converter->setCurrencyFrom(CurrencyCodes::ISO_USD);
$converter->setCurrencyTo(CurrencyCodes::ISO_LKR);
$converter->setAmount(10);

$result = $converter->convertCurrency();

?>

About

A light weight PHP class that can convert two currencies using exchangerate.guru API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages