Jump to content

Currency Conversion?


woolyg

Recommended Posts

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

Link to comment
Share on other sites

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. :P

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. :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.