Currency

real-time currency converter?

I need to include an automatic call to a real-time exchange rate table to get the ratio in a PhP code, so prices calculated (i.e. $Euroval) can be displayed also in other currency(ies), such as $Gbpavl = $Euroval * $k. Anyone knows a site where I can get that? I just want to make a call to a site and receive "k" in response. The call must be invisible and processed at the server, before downloading the HTML to the client. I have curl, I can access XE, but no idea how to pass "val", "FmEur", "ToGBP", and get back "0.666"... Bit of code?

Public Comments

  1. It's a little bit naughty, but if you have "curl" compiled into PHP, you can use Ajax to get the exchange rates from, for example, XE.com in realtime! [edit] I guess you're trying to hack their non-free way! I'm talking about simply screen-scraping the front page of their website and doing it that way. OK, I'm cheesy - but it works!
Powered by Yahoo! Answers