Problem:
I have prices that are fetched from a DB to several pages on my site.
The prices all need to be displayed as one USD cost.
The prices are generally in 2 currencies. e.g. Euros and GB Pounds.
Essentially i need to get the euro price, get the pound price covert each of them to USD and add them up, display the price and display the rate of exchange applied.
I would like the prices updated daily based on rates from the XML file at http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
Prices need to be updated once a day only.
My initial idea was to fetch the xml rates once a day, and convert the prices i have on each request.
But thats perhaps a lot of work as the price will be the same for the entire 24hour period..
incase the currency site and feed are unavailable on a particular day i would like to use the previous days cached rate and display prices based on that ROE.
I am looking on any suggestions, ideas on how to go about this. Thanks.