hi i have problem to show 30 streamer with api, just show 1 streamer can you help me?
<?php
$_POST = $_GET;
function is_channel_live($channel) {
include('config.php');
$request = json_decode(file_get_contents_curl( $TwitchApiStream ));
$request2 = json_decode(file_get_contents_curl( $TwitchApiUsers ));
echo('<link rel="stylesheet" type="text/css" href="style/streamer.css">');
$tum = $request->data[0]->thumbnail_url;
$tum2 = str_replace("{width}x{height}", "1920x1080", "$tum");
echo ("<br><div class='StreamBorder'>");
echo ("<a href='https://www.twitch.tv/". $request->data[0]->user_name ."' >");
echo ("<div class='StreamerLiveTxt'>Live</div>");
echo ("<img class='StreamerBanner' src='". $tum2 ."'</img>");
echo ("<div class='StreamerTitle'>". $request->data[0]->title ."</div>");
echo ("<div class='StreamerName'>". $request->data[0]->user_name ."</div>");
echo ("<div class='StreamerGame'>". $request->data[0]->game_name ."</div>");
echo ("<div class='StreamerViewer'>". $request->data[0]->viewer_count ."</div>");
echo ("<img class='StreamerProfile' src='". $request2->data[0]->profile_image_url ."'</img>");
echo ("<img class='StreamerGamepic' src='". $game2 ."'</img>");
echo ("</a>");
echo("</div>");
}
if(is_channel_live($_POST)) {
echo "";
} else {
echo "";
}
function file_get_contents_curl($url) {
include('config.php');
$curlHeader = array(
"Client-ID: ". $TwitchClientId ,
"Authorization: Bearer ". $TwitchToken ,
"Accept: application/vnd.twitchtv.v5+json"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $curlHeader);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
?>
my config.php
my preview

pls help me