Programmatically access currency exchange rates

Viewed 74174

I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars.

Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can access from my PHP script ?


UPDATE: I have now written a PHP class which implements this. You can get the code from my website.

15 Answers

You can get currency conversions in a simple format from yahoo:

For example, to convert from GBP to EUR: http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=sl1d1t1ba&e=.csv

XE.com provides feed for their exchange rates. Not free though.

coinnill.com has a sort-of web-service.

http://coinmill.com/rss/AUD_USD.xml

will give you the AUD --> USD rate for example. You'll just need to parse the XML that comes back.

Related