First you need to find a (free or paid) service that allows you to do the conversion. For this, search Google and you'll find a lot of results.
Depending on the service, you typically use a Web Service to get their data, although plain XML or simple http requests are common as well. Then at your server, where you need the currency you can do something like this (pseudo) code:
If currency not in the cache then
' Connect to your conversion service
' Get the conversion rate
' Store the conversion rate in the cache
End if
Return the conversion rate.
By storing it in the cache, you don't have to connect to the remote service every time you need the rate....
Hope this helps,.
Imar
|