<?php
$user = $_GET['userid'];
$url = 'https://api.twitch.tv/kraken/user';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: OAuth ' . $user,
'Accept: application/vnd.twitchtv.v5+json'
));
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Forgot the version header. Sorry