I am attempting to use cURL with the Stack Exchange API but I seem to be getting a null response, any ideas on what's happening?
My code is:
function get($get){
$ch = curl_init("http://api.stackoverflow.com/1.1/search?intitle=meteor");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_ENCODING , "gzip");
$decoded = json_decode(curl_exec($ch), true);
var_dump($decoded->questions[0]->title);
}
get("stackoverflow");