Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2011-04-29
Medium Priority
Last Modified: 2012-05-11
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.
Question by:theideabulb
  • 4
  • 2

Author Comment

ID: 35494314
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.
LVL 53

Expert Comment

ID: 35494352
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.  

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.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

LVL 53

Accepted Solution

_agx_ earned 2000 total points
ID: 35494460
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 --->
		CSymbol: #myRate[1].csymbol.xmlText#<br>
		CName: #myRate[1].cname.xmlText#<br>
		CRate: #myRate[1].crate.xmlText#<br>
		CInverse: #myRate[1].cinverse.xmlText#<br>
	something went wrong. do something with the error
	<cfdump var="#cfhttp#">	

Open in new window

LVL 12

Expert Comment

ID: 35494495
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.

LVL 53

Expert Comment

ID: 35494577
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.
LVL 53

Expert Comment

ID: 35494598
.... and note the url is just a static sample page (http://www.xe.com/dfs/sample-usd.xml) it's not a live feed.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Screencast - Getting to Know the Pipeline
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question