<?php
$streamChannel = "kamiiq";
$url = "https://api.twitch.tv/kraken/streams?channel=" . $streamChannel;
$clientID = '6x31cwwskz31pmkfibymz8un59icd2';
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
'Client-ID: ' . $clientId
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $channelsApi . $channelName
));
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $clientID);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$json_array = json_decode(file_get_contents_curl($url), true);
if(isset($json_array['streams'][0]['channel'])) {
echo '( ͡° ͜ʖ ͡°)';
} else {
echo 'nope';
}
?>
its saying nope, always. (multistreaming with restream [twitch and yt work correctly]) i check app config, its correct - for me…