Created
October 25, 2009 22:46
-
-
Save sh1mmer/218295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ch = curl_init(); | |
$query = 'select * from search.web where query="pizza"'; | |
$url = "http://query.yahooapis.com/v1/public/yql?q=" . urlencode($query) . "&diagnostics=false&env=store://datatables.org/alltableswithkeys&format=json"; | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
$response = curl_exec($ch); | |
curl_close($ch); | |
$response = json_decode($response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment