Hi ereveyone,
I have a little script to display streamers of a game (Football Manager) in my website.
Today, the script doesn’t work. Any changes ?
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://api.twitch.tv/helix/streams?game_id=514816&language=fr&first=15”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “GET”,
CURLOPT_HTTPHEADER => array(
“Client-ID: XXXXXXXXXXXXX”,),));
$response = curl_exec($curl);
curl_close($curl);
$results = json_decode($response,true)[‘data’];
count($results);