Hallo.
Ich würde gerne einen Code einbinden via WP PHP Widget.
Der Code lautet wie folgt:
PHP
<?php
header('content-type: image/png');
$stream = "####URL####";
$json_file = @file_get_contents("http://api.justin.tv/api/stream/list.json?channel={$stream}", 0, null, null);
$json_array = json_decode($json_file, true);
if ($json_array[0]['name'] == "live_user_{$stream}") {
echo file_get_contents("online.png");
}else{
echo file_get_contents("offline.png");
}
?>
Alles anzeigen
allerdings spuckt er mir nur hieroglyphen aus ... was mach ich falsch?!