ninedoors Posted November 3, 2008 Share Posted November 3, 2008 I understand how to parse the JSON data once I get it into a variable but how do I get the JSON string from a url. The url I am working with is http://www.totallyscored.com/json/sport/7, where I get the recent scores from the NFL. I know I could use the rss feed, but it won't work as well as the JSON will if I can get it. Anyone have an idea of how to do this I know it is possible I just can't find it on google. Lots of parsing tutorials but nothing on actually retrieving the data from the server. Thanks for the help. Nick Link to comment https://forums.phpfreaks.com/topic/131198-json-parsing/ Share on other sites More sharing options...
rhodesa Posted November 3, 2008 Share Posted November 3, 2008 $url = 'http://www.totallyscored.com/json/sport/7'; $data = json_decode(file_get_contents($url)); print_r($data); Link to comment https://forums.phpfreaks.com/topic/131198-json-parsing/#findComment-681178 Share on other sites More sharing options...
ninedoors Posted November 3, 2008 Author Share Posted November 3, 2008 Thanks Aaron. Might be back if my parsing doesn't go as planned! Nick Link to comment https://forums.phpfreaks.com/topic/131198-json-parsing/#findComment-681189 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.