'Just Chatting', 'viewers' => '480K', 'tags' => ['IRL', 'Casual'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg' ], [ 'title' => 'League of Legends', 'viewers' => '210K', 'tags' => ['MOBA', 'Action', 'Strategy'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/21779-285x380.jpg' ], [ 'title' => 'VALORANT', 'viewers' => '150K', 'tags' => ['FPS', 'Shooter', 'Tactical'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/516575-285x380.jpg' ], [ 'title' => 'Grand Theft Auto V', 'viewers' => '120K', 'tags' => ['Adventure', 'Open World'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/32982_IGDB-285x380.jpg' ], [ 'title' => 'Fortnite', 'viewers' => '110K', 'tags' => ['Battle Royale', 'Shooter'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/33214-285x380.jpg' ], [ 'title' => 'Counter-Strike 2', 'viewers' => '95K', 'tags' => ['FPS', 'Tactical', 'Shooter'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/1812225397_IGDB-285x380.jpg' ], [ 'title' => 'World of Warcraft', 'viewers' => '80K', 'tags' => ['MMORPG', 'RPG'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/18122-285x380.jpg' ], [ 'title' => 'Dota 2', 'viewers' => '75K', 'tags' => ['MOBA', 'Strategy'], 'img' => 'https://static-cdn.jtvnw.net/ttv-boxart/29595-285x380.jpg' ], ]; $live_channels = [ [ 'name' => 'xQc', 'game' => 'Just Chatting', 'title' => 'RANKED GRIND! | !socials', 'viewers' => '98K', 'tags' => ['Competitive', 'English'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/xqc-profile_image-9298d2877057642a-70x70.png' ], [ 'name' => 'Tarik', 'game' => 'VALORANT', 'title' => 'Vibing and Winning | #1 Radiant', 'viewers' => '65K', 'tags' => ['FPS', 'Pro Player'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/tarik-profile_image-d6f82a69354da623-70x70.png' ], [ 'name' => 'summit1g', 'game' => 'Old School RuneScape', 'title' => 'Maxing my account! | !drops', 'viewers' => '31K', 'tags' => ['MMORPG', 'Grinding'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/summit1g-profile_image-d29b89b15533818c-70x70.png' ], [ 'name' => 'LIRIK', 'game' => 'DayZ', 'title' => 'SURVIVAL RP | !newvideo', 'viewers' => '25K', 'tags' => ['Survival', 'Funny Moments'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/lirik-profile_image-4ac8c3250307d433-70x70.png' ], [ 'name' => 'Shroud', 'game' => 'Counter-Strike 2', 'title' => 'Aim training and pro plays', 'viewers' => '40K', 'tags' => ['FPS', 'Pro'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/shroud-profile_image-8839d8f9052f83ca-70x70.png' ], [ 'name' => 'Pokimane', 'game' => 'Just Chatting', 'title' => 'Chill stream and Q&A', 'viewers' => '35K', 'tags' => ['IRL', 'Community'], 'img' => 'https://static-cdn.jtvnw.net/jtv_user_pictures/pokimane-profile_image-9332cf5d27f13321-70x70.png' ], ]; // Calculate statistics $total_viewers = 0; foreach ($live_channels as $channel) { $viewers = str_replace('K', '000', $channel['viewers']); $total_viewers += (int)$viewers; } $total_live_channels = count($live_channels); $top_category = '-'; if (!empty($top_games)) { $top_category = $top_games[0]['title']; } // Read project preview data from environment $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Twitch.TV Statistics Dashboard'; $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; $projectName = $_SERVER['PROJECT_NAME'] ?? 'Twitch Stats'; ?> <?= htmlspecialchars($projectName) ?> - Dashboard

Dashboard Analytics

Total Viewers

Total Live Channels

Top Category

Top Categories

<?= htmlspecialchars($game['title']) ?>

viewers

Recommended Live Channels

<?= htmlspecialchars($channel['name']) ?>