woolyg Posted November 10, 2008 Share Posted November 10, 2008 Hi, I'm starting development on a site that will be taking orders internationally, and I'd like for customers to be able to see a set value of money (say, 100 USD) in their localised currency. Has anyone else here ever done this? I'm thinking of trying to capture a currency RSS feed every 6 hours, then bringing the XML data into a table, but this method will be verrrry time consuming, code-wise! Has anyone had any experience in this? I'm posting as off-topic as it doesn't really qualify as PHP help, per se.. Cheers, WoolyG Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/ Share on other sites More sharing options...
JasonLewis Posted November 10, 2008 Share Posted November 10, 2008 Yes I've done it once. Um, there is a free XML feed that you can get that is updated every... I don't know how often. It's not very time consuming at all. Simply parse the XML feed, then convert. Ah here it is, the European Central Bank has a free feed that you can use. The XML file is available here. It's not every country, only about 15 or something. But it's got the major ones. If you want, I think you can pay for one over at UCC. Now, take a look at this article, and take note of the link down the bottom. Hopefully you can figure it out from that. Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-686532 Share on other sites More sharing options...
woolyg Posted November 10, 2008 Author Share Posted November 10, 2008 Thanks ProjectFear, That's set me in the right direction. You rock! Cheers, WoolyG Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-686536 Share on other sites More sharing options...
corbin Posted November 10, 2008 Share Posted November 10, 2008 This is kind of random, and won't help you much, but if I were you, I would make sure the value hasn't changed by a certain percent since the last change (like 10% or something). I'm paranoid, and knowing my luck, the site doing the feed would malfunction and say a USD is 0 Euros or something. lol Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-687248 Share on other sites More sharing options...
woolyg Posted November 11, 2008 Author Share Posted November 11, 2008 Valid point Corbin! I saw from the outset that the currency conversions are not exact (it's an XML feed from a european bank and I'm trying to convert NZD into USD, so it's converting it to EUR in between there, hence a small margin of error), but all I wanted to do was to give prospective customers an idea of what the cost would be in their currency. I'll be putting a note on the page that it's not absolutely exact, and the actual cost might fluctuate depending on currency changes in the previous 24 hours. But all in all, a SWEET resource. Cheers, WoolyG Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-687284 Share on other sites More sharing options...
corbin Posted November 11, 2008 Share Posted November 11, 2008 Oh.... If they actually pay in your currency, and a third party handles the exchange of money, then I guess it doesn't matter much since it's just an indicator.... ;p Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-687369 Share on other sites More sharing options...
JasonLewis Posted November 11, 2008 Share Posted November 11, 2008 If you want a really accurate match then head over to UCC. But yeah, if its just an indicator it'll do. It's free, so stop complaining. Quote Link to comment https://forums.phpfreaks.com/topic/132103-currency-conversion/#findComment-687549 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.