Need to get daily value of 1 dollar in Euro and British Pound

I would like to know if there is a way for me to schedule a task to grab the value of the British Pound and Euro for $1 USD.   So for example, today the GPB is .60 and the Euro is .67.  I found that on a website, but  I am wondering if anyone has used a website to grab that value every day.
theideabulbAsked:
Who is Participating?
 
_agx_Commented:
Obviously the final code'll depend on the site you choose and the format of their feed. But here's an example using xe.com's  sample xml feed:

<cfhttp url="http://www.xe.com/dfs/sample-usd.xml" method="get"/>
<cfif cfhttp.statusCode eq "200 OK">
	<cfset results = xmlParse(cfhttp.fileContent)>
	<cfset myRate = xmlSearch(results, "/xe-datafeed/currency[csymbol = 'GBP']")>
	<!--- needs error handling --->
	<cfoutput>
		CSymbol: #myRate[1].csymbol.xmlText#<br>
		CName: #myRate[1].cname.xmlText#<br>
		CRate: #myRate[1].crate.xmlText#<br>
		CInverse: #myRate[1].cinverse.xmlText#<br>
	</cfoutput>
<cfelse>
	something went wrong. do something with the error
	<cfdump var="#cfhttp#">	
</cfif>

Open in new window

0
 
theideabulbAuthor Commented:
right, i found plenty of sites that can convert for me, but I am looking to grab it automatically everyday.  I am not sure how I would grab stuff from that page.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
_agx_Commented:
I haven't used that site myself, but like most they offer data feeds.  Once you sign up (some charge a fee) they provide data feeds in various formats.  That site offers:  xml, csv, html.  
http://www.xe.com/dfs/product.php

They probably give you a url and access key. Then you can use cfhttp to grab the data from their site every day. It's pretty simple.
0
 
AmickCommented:
Note that the terms of use for xe.com prohibit automated extraction from their public page.

You may already be aware that Microsoft has shipped a connection to MSN MoneyCentral Investor Currency Rates with Excel for some time.

In Excel 2007 go to the Data tab, select Existing Connections, then select MSN MoneyCentral Investor Currency Rates, enter the target cell and press OK.  If you accept A1 as the starting cell, Euros expressed as US dollars should be found at B17, and British Pounds at B10.  The inverse is found in column C.

0
 
_agx_Commented:
Note that the terms of use for xe.com prohibit automated extraction from their public page.

Good point.  

BTW: The code was just an example. I was *not* suggesting anyone scrape their main site. That's why I mentioned having to sign up (pay a fee) and most likely being provided with a private url and access key.
0
 
_agx_Commented:
.... and note the url is just a static sample page (http://www.xe.com/dfs/sample-usd.xml) it's not a live feed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.