- Tiger wrote:
- Well I did some research and it looks like Google can spit out json itself:
http://www.google.com/finance/info?client=ig&q=OIL.
I've never worked with json before. What's the best way to load it as an object from a url?
research jsonp:
- Code:
-
<script src="http://www.google.com/finance/info?client=ig&q=OIL&callback=alert"></script>
afaik, yahoo is the only major site that's benevolent enough to proxy anyone's xml data into json for free.
if they do die, you can create your own soap to json tool using php, xslt, or asp. they are even some almost drop-in tools to do basic conversions.
another option is to use a simply proxy to grab the code from NWS and serve it as an untouched string, feeding it to client side ajax that the handles xml.
server-wise that's a one or two line script that should be able to be served for free without ads (as javascript) from one of the dozens of free hosting services that offer any type of server scripting.
this also lets you scrape HTML using the browser DOM tools, which are FAR superior to any backend HTML parser. If you simply proxy a few urls in whole, your ajax can grab html table, csv, and xml data from nws. you can sniff img tags to grab the src url, embeding that image without cruft into your own site. lots of options...
__________________