Hi,
I need a system to automatically retrieve exchange rates that I can then use on my site to convert a value held in a database to that currency. Does any one have some code or source of code that I can use for this.
I tried systems that use SOAP but i kept getting errors and I dont have a clue what was going on!
I just want to create function that will grab the rates for USD, GBP and Euros and then convert using a single function, something like:
PHP Code:
function curConvert($amount, $from, $to) {
if (!strcmp($from,"USD") {
// Check $to
//Convert from USD to $to and return ammount
}
if (!strcmp($from,"GBP") {
// Check $to
//Convert from GBP to $to and return ammount
}
if (!strcmp($from,"EUR") {
// Check $to
//Convert from EUR to $to and return ammount
}
}
TIA