<cfhttp url="http://www.google.com/ig/calculator?hl=en&q=1EUR=?USD" method="get" timeout="5">
<cfoutput><cfset euroRate = #HTMLCodeFormat(cfhttp.FileContent)#>
#euroRate#
</cfoutput>
The output looks similar to this:ASKER
<cfhttp url="http://www.google.com/ig/calculator?hl=en&q=1EUR=?USD" method="get" timeout="5">
<cfset euroRate = #HTMLCodeFormat(cfhttp.FileContent)#>
<cfset euroRate = HTMLEditFormat(#euroRate#)>
<cfoutput>#euroRate#</cfoutput>
<cfset euroRate = #Left(euroRate, 65)#>
<cfset euroRate = #Right(euroRate, 10)#>
<p><cfset euroRate = rereplace(euroRate, "[^0-9\.]", "", "all")>
<cfoutput>#euroRate#</cfoutput> (Euros per U.S. Dollar)
ASKER
ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.
TRUSTED BY
ASKER
I tried your recommendation, but likely need a more plug-n-play bit of code. I got errors returned.
The value returned from Google may also be wrapped in a hidden <PRE>. I ran the value through HTMLEditFormat(#euroRate#)
<PRE>{lhs: "1 Euro",rhs: "1.3337 U.S. dollars",error: "",icc: true}</PRE>
That would take care of having to escape the quotes. Might take multiple replacements to clean that up.
Ultimately I'm hoping to end up with just the value of 1.3337 that I can save in a variable and use in a math equation.
Thanks,
Tom