Hello guys. I have a website that lists certain streams when they are online.
Recently it stopped working
As I understand after reading migration guide I need to put Accept: application/vnd.twitchtv.v5+json somewhere in the code.
So I have the following:
$twitch_url = "https://api.twitch.tv/kraken/streams?channel=". $twitch_channels .""; $clientId = 'xxxxxxxxxxxxxxxxxxxxxxxx'; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_HTTPHEADER => array( 'Client-ID: ' . $clientId ), CURLOPT_RETURNTRANSFER => 1, CURLOPT_TIMEOUT => 30, CURLOPT_URL => $twitch_url)); $data = curl_exec($curl); curl_close($curl);
Could you please help me to put “Accept: application/vnd.twitchtv.v5+json” properly