/ Published in: PHP
URL: http://groups.google.com/group/yelp-developer-support/browse_thread/thread/d52aa7033b3e7dbd#
Also check out...
http://roshanbh.com.np/2008/10/creating-parsing-json-data-php.html
Expand |
Embed | Plain Text
$yelpstring = file_get_contents("http://api.yelp.com/business_review_search?category=bars&lat=".$latitude."&long=".$longitude."&radius=25&num_biz_requested=100&ywsid=<your yelp account id>", true); $obj = json_decode($yelpstring);// Convert JSON from yelp return string foreach($obj->businesses as $business): if( $business->address2 ){ }; echo "<hr>"; endforeach;
Comments
Subscribe to comments
You need to login to post a comment.

Good simple example. Thanks for putting it out there.
Curl is much, much faster almost 4x (http://stackoverflow.com/questions/555523/file-get-contents-vs-curl-what-has-better-performance)