Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omartawba1/currency_converter
Currency converter package helps you to easily convert any amount from specific currency to another one.
https://github.com/omartawba1/currency_converter
composer currency-converter php
Last synced: about 2 months ago
JSON representation
Currency converter package helps you to easily convert any amount from specific currency to another one.
- Host: GitHub
- URL: https://github.com/omartawba1/currency_converter
- Owner: omartawba1
- License: mit
- Created: 2017-01-17T10:09:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-26T12:13:25.000Z (almost 8 years ago)
- Last Synced: 2024-10-31T06:51:35.440Z (about 2 months ago)
- Topics: composer, currency-converter, php
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
Currency converter package helps you to easily convert any amount from specific currency to another one.
## Installation
Using Composer :```
composer install
```Or you can do
```
composer require tawba/currency-converter
```If you don't have composer, you can get it from [Composer](https://getcomposer.org/)
## Run the application
```
php index.php list
php index.php convert
```## Usage
```
use Tawba\CurrencyConverter\ConverterService;$from_currency = "USD";
$to_currency = "EGP";
$amount = 1000;$converter = new ConverterService(); // You can pass "google" or "yahoo" as a service API
echo $converter->convert($from_currency, $to_currency, $amount);
```You can test it by changing $from_currency, $to_currency, and $amount that exist inside index.php file
Notice: This package uses Google or Yahoo currency converter API.