PHP Classes

Realtime PHP Currency Exchange: Convert currency amounts using different sites

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 507 All time: 5,783 This week: 524Up
Version License PHP version Categories
currency-exchange 0.2.2GNU General Publi...5.3PHP 5, Web services, Finances


This class can convert currency amounts using different sites.

It takes an amount value and the symbols of two currencies and sends HTTP requests to sites that provide currency conversion services to convert the amount between one currency to the other.

Currently, it can get currency converted amounts from Yahoo Finance, OpenExchange and Rate Exchange API.

Picture of Anish Karim C
  Performance   Level  
Name: Anish Karim C <contact>
Classes: 5 packages by
Country: India India
Age: 42
All time rank: 81546 in India India
Week rank: 75 Up8 in India India Up


Currency Converter ==================== Currency Converter is a multi-API based realtime money converter. We cannot guarantee the accuracy of the conversion as it is based on several feeds out there. Currently we have used three currency feeds available freely in the net. We have used OpenExchange, Yahoo Finance and Rate Exchange [not completed yet]. F.A.Q ==================== = Open Exchange Account with AppId - To enable the Open Exchange feed, we need an AppId which we can generate from by clicking the Get Your App Id Link on the top right of the site. Under the plans you can see the "Forever Free" plan and register with your email to get the AppId. * AppId for testing purpose: dde15ce68f0a42709c53c6e286d6194c [1000 Requests/Month] = Currency API with Key - To enable Currency API, we need to login to the site On login to the site, you will get an API Key generated in your Dashboard. This API only support limited currencies, but provide reliable fast service. * Key for testing purpose: 1cd79c61dd1b6b50f7eb2026e397e75e49c82221 [3000 Request/Month] = The Other Feed - We have Yahoo Finance( doesn't need any Key or Registration to access the feeds and get the result. = Why Three Feeds - I use three feeds, all having most accurate feeds with 99% of uptime guaranteed. Two of the feeds need Registration and to get App Key. The third one (Yahoo), does not need any Key to get the data. So at least one of the Conversion works always, which gives 100% result availability. = Exceptions.log - Make sure the exceptions.log has full permission so that the class can write the issues it gets on converting feeds. It is always recommended to turn on the Exceptions to identify the issues. You can turn the Error Log off by change the value of the ErrorLog variable to false. TODOs ==================== FIXES ==================== Fixed the OpenExchange Conversion Calculation. Note to the Developers out there: ==================== = Please feel free to check the accuracy of the feeds and let me know how we can improve the currency conversion to the better level. = Let me know if you have any list of APIs that supports Currency Conversion. = I have set up git repository for this project, publically available on Please check the URL Fork it, Develop it, for good!. Thanks! --------------------------------------- / Developed By: Anish Karim \ | Email: thecoderinATgmailDOTcom | \ Version: 0.2.1 / --------------------------------------- \ /\ ___ /\ \ // \/ \/ \\ (( O O )) \\ / \ // \/ | | \/ | | | | | | | | | o | | | | | |m| |m|

  Files folder image Files  
File Role Description
Accessible without login Plain text file converter.php Example Example File
Plain text file currencyConverter.class.php Class Class File
Accessible without login Plain text file exception.log Data Log File
Accessible without login Plain text file index.html Data HTML Application
Accessible without login Plain text file README Doc. Read Me

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,783
This week:524Up
User Comments (1)
Total Rubbish, doesn't work
10 years ago (Dan gates)