- Move from file_get_contents to curl
- Use cURL to set headers
<?php
$ch = curl_init('https://api.twitch.tv/kraken/streams?channel=' . $callAPI);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/vnd.twitchtv.v5+json',
'Client-ID: CLIENTID'
));
file_get_contents is insecure for HTTP requests and blocked on most hosts