[thelist] Currency Converter Script?

Gordon MacLeod gomac11 at rogers.com
Wed May 19 13:23:38 CDT 2004


Hi Chris,
Since currency xchange fluctuates by the minute, their is no script
solution to your problem - you need data. The math part of the script is
easy, it's the conversion rate that you need to obtain.

Depending on your accuracy needs Oanda has great data tools in all sorts
of flavours. They have a simple, free daily email which will give you
the mean average for the US/Nuck$ 1 dollar conversion for the previous
business day (inter-bank rate):
http://www.oanda.com/channels/business/FXMail.shtml

If you want more frequent data, you'll have to pay them, but I've used
them in the past and they are very accurate. You'll have to set up a
process to capture and parse the mail, but you'll get your conversion
variable and be able to use it in your pages. The interbank rate is not
what consumers get, but the conversion is easy (+4%).

You can also get an XML stream, and a couple of client/server services
from them as well (see http://www.oanda.com/site/customize.shtml).

Another option is to scrape the data from reuters - be aware if your
doing this as a public venture than this is copyright infringement - but
if it's a private site this works. Set up a server process that writes a
flat text file to your server, and parse
http://finance.yahoo.com/q?s=USDCAD=X with it for the last trade row
value. Use this value as your conversion variable, and include it in any
page that requires it. If you want CDN>>US the page is
http://finance.yahoo.com/q?s=CADUSD=X.

Cheers,
Gord	

«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤
        http://gord.macleod.name
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤





-----Original Message-----

Hello,

I am looking for a script that will put the US to Canadian 
Currency Exchange
rate on a website. The rate need only be accurate to when the user first
loads the page. Preferably, the script should be implemented using
javascript, however Perl, Python, php, ColdFusion, or ASP (not 
.net) will
also work (with Perl being most preferable to ASP least preferable).

Anyone know if this exists?

The point is that US customers can see the current exchange 
rate when they
visit Canada and convert their money.

Thanks,

Chris
-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list