Well you loaded http:// there…
Usually this is either a problem your side (most commonly your computer time is wrong)
Or less likely some royally f’ed up somewhere in the certficate chain ABOVE the site, which then isn’t a Twitch problem or you problem anyway.
Edit 1: ALSO, might also be the fact you are using file_get_contents
which is horribly insecure for performing HTTP requests, use cURL instead. On most hosting providers fgc is blocked from performing these requests at the php.ini level for security reasons
Edit 2: Also your cert bundle could be totally out of date on your server, so check for an update that, which is never fun, some distros borked it up a while back and server admins had to faff about manually with bundles from cURL itself