Results 1 to 4 of 4

Thread: JS currency converter?

  1. #1
    Join Date
    May 2010
    Posts
    39
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Default JS currency converter?

    Is it possible to have JS that will grab currency rates from sites such as this http://uk.finance.yahoo.com/currenci...P;to=EUR;amt=1 and using them convert currency on your site without referal to source? And is it legal?

    Thanks!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    It's not illegal, but it may be against their terms of service (so it is illegal, or at least a grey area.... I don't know all of the technical details). If you credit them and it doesn't say you can do that in the TOS, then it's probably ok. At the very least, I expect you can find some site out there with the info that DOESN'T say you can't do it, and that's probably ok. But to be really safe, why not just ask them?

    As for doing this, you can't do it using just Javascript unless they have some sort of API that is designed for that. Instead, you will need to use a serverside language like PHP (ASP, CGI, JSP, etc) that can load the page to your server, parse it and then return only the relevant info. Then you can use Javascript to display the information as needed (for example with Ajax).


    It will not be easy and it may not be legal. It's not impossible though.

    Really, I'd suggest just contacting the various services and hoping to get lucky AND looking for one that already has an API. It may require an ad from their site on yours, but that's a small price to pay for a live service. (This isn't just a one-time thing-- you're relying on them to keep the information accurate.)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    NickNameDrive (05-27-2010)

  4. #3
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    the ecb has a currency rate xml feed that i think can be used freely. You can get it here http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml, You will need a php parser to publish it. If you use wordpress I know of a plug in that uses this feed.

  5. The Following User Says Thank You to azoomer For This Useful Post:

    NickNameDrive (05-27-2010)

  6. #4
    Join Date
    May 2010
    Posts
    39
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by azoomer View Post
    the ecb has a currency rate xml feed that i think can be used freely. You can get it here http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml, You will need a php parser to publish it. If you use wordpress I know of a plug in that uses this feed.
    From ECB, solid! Will try, post result later.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •