Rob Brooks-Bilson
Tech, Photography, Stuff
Tech, Photography, Stuff
April 21, 2006
cf_stockGrabber, a custom tag I wrote way back in 1997 when custom tags were first introduced in ColdFusion still has a lot of users today. The tag uses cfhttp to query Yahoo with a list of ticker symbols and returns the results as a query object which can then be used in a variety of ways.
There haven't been any changes to the tag since 2002. However, I've had several people contact me in the past week or so with problems related to certain ticker symbols. It turns out Yahoo made some changes to their feed which resulted in company names containing commas in certain instances. This in turn caused the tag to return an error as it was interpreting the comma as an extra delimiter and throwing the whole column count of the result set off.
This was easily fixed by adding a set of double quotes to the TEXTQUALIFIER attribute of the cfhttp tag. I've updated the tag on the Macromedia/Adobe Exchange with the changes. Here's the link to the latest version of a zip containing the file on my site:
4/21/06 5:37 PM
Perfect timing!
Just today, a page on which I was using a web service to retrieve this information broke (probably due to the same issue).
In just a few minutes, I was able to replace the call to the web service with a call to your custom tag.
The page was down for about an hour all told (from first error to fix).
Thanks!
4/22/06 10:29 AM
Hi Steve, I'm glad it worked out!
Cheers ;-)
11/14/06 6:43 AM
I just read here: http://www.finwin.com/Dev/quotes/ that CF_Stockgrabber is illegally redistributing quotes. Is that true?
11/15/06 8:17 AM
Hi Tom,
There's nothing inherently illegal about the tag - all it does is download quotes from Yahoo. Downloading the quotes for personal use is perfectly legal. Redistributing the quotes, however, is against the Yahoo terms of service.