Retornar dados de um subreddit do site imgur.com

$client_id = "";
 $c_url = curl_init();
 curl_setopt($c_url, CURLOPT_SSL_VERIFYPEER, false);
 curl_setopt($c_url, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($c_url, CURLOPT_URL,"https://api.imgur.com/3/gallery/r/");
 curl_setopt($c_url, CURLOPT_HTTPHEADER, array('Authorization: Client-ID ' . $client_id));
 $result=curl_exec($c_url);
 curl_close($c_url);
 $json_array = json_decode($result, true);
 print_r($json_array);

Nenhum comentário:

Postar um comentário