Url API v3 to v5

  1. Move from file_get_contents to curl
  2. 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

http://www.php.net/manual/en/function.curl-setopt.php