thanks but this worked yet:
<?php
$channelsApi = 'https://api.twitch.tv/helix/streams?user_login=';
$channelName = 'tracepaladinxxl';
$clientId = 'xxx';
$ch = curl_init();
$apiVers = '&api_version=5';
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
'Client-ID: ' . $clientId
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $channelsApi . $channelName . $apiVers
));
$response = curl_exec($ch);
$bX = strlen($response);
if($bX > "27") {
echo "Stream is Online";
}
else {
echo "Stream is Offline";
}
echo"</br>";
var_dump(json_decode($response, true));
echo"</br>";echo"</br>";echo"</br>";
echo "$response";
echo"</br>";echo"</br>";echo"</br>";
echo"</br>";echo"</br>";
echo "$bX";
?>