I need a system that will automatically populate a list of currencies and then update each currency with the current exchange rate and timestamp of that exchange rate. The first thing I need is information. A small report is required to list available rss feeds for currencies (basically a list of links to choose the best one from). This should include real life currencies as well as second life Linden Dollars (see [login to view URL]).
Database tables need to be updated regularly to keep a list of all available currencies up to date and similiarly the rate of convertion between a base currency which must be user definable with a time stamp for when each convertion rate was saved is needed. This must be unix time stamps stored as int data type in a database (See php time() ).
The system should be 100% automated, using a php script called from a cron jobs. It should also allow for manual update by clicking a button / link.
A php class is required. All functionality must be encapsulated within this class as functions. It should also provide convertion methods for currencies. This must allow for time based convertions. For example the convertion between £ and $ on the 21/06/09 should use the rate recorded for that date. Similiarly if a cost of £100 is to be converted over 3 days then each day must use the convertion rate recorded for it (or use multiple rates if more than 1 is recorded per day).
All information stored within the database must be listed on html pages. This includes but is not limited to all available currencies as well as a listing for each currency and its convertion rate as a historical view, a edit page to set the base currency to which all others are converted by default is also required as well as an option to set "Enabled" on a currecy so that only the ones in use are updated. This should be plain and basic html - it just has to work.
Database
The database schema is:-
Currency
ID, Name, Symbol, Enabled, Base
Convertion_Rate
ID, CurrencyID, Convertion_Rate, Timestamp