Alors là je peux vraiment beaucoup mieux t'aider (j'ai déjà conçus des extension chrome pour twitch)
C'est simple, regarde ton url:
$api = file_get_contents('https://api.twitch.tv/kraken/streams/therealpugzillaclient_id=pfake1inxcypryrgbpihlzbctyhmh5');
tu as juste oublié ce symbole: &
$api = file_get_contents('https://api.twitch.tv/kraken/streams/therealpugzilla?client_id=pfake1inxcypryrgbpihlzbctyhmh5');
Si ta besoin d'aide pour twitch je suis ton homme ahaha. Par contre je te conseille d'utiliser autre chose que file_get_contents même si ça fais le job
En plus ça tombe bien, j'avais commencé à dev une classe pour aider à mieux appeller l'api mdr
EDIT: dans ton if == null à la place, tu peux faire comme ça aussi