exit;
}
if (isset($_GET["youtube-graphs"])) {
    youtube_graphs();
    exit;
}
if (isset($_GET["youtube-table"])) {
    youtube_table();
    exit;
}
if (isset($_GET["youtube-search"])) {
    youtube_search();
    exit;
}
if (isset($_GET["youtube-videos"])) {
    youtube_videos();
    exit;
}
if (isset($_GET["youtube-videos-search"])) {
    youtube_videos_search();
    exit;
}
if (isset($_GET["rescan"])) {
    rescan_js();
    exit;
}
if (isset($_POST["rescan"])) {
    rescan();
    exit;
}
$users = new usersMenus();
Esempio n. 2
0
    $parameters = array('key' => $key, 'channelId' => $channelId, 'type' => 'video', 'eventType' => $eventType, 'part' => 'id,snippet', 'order' => 'date', 'maxResults' => '20');
    $youtube = json_decode(file_get_contents('https://www.googleapis.com/youtube/v3/search?' . http_build_query($parameters)), true);
    foreach ($youtube['items'] as $video) {
        $id = $video['id']['videoId'];
        $title = $video['snippet']['title'];
        $thumb = $video['snippet']['thumbnails']['default'];
        ?>
<a href="http://youtube.com/watch?v=<?php 
        echo $id;
        ?>
">
<img src="<?php 
        echo $thumb['url'];
        ?>
" style="width: <?php 
        echo $thumb['width'];
        ?>
px; height: <?php 
        echo $thumb['height'];
        ?>
px;"><br>
<?php 
        echo $title;
        ?>
</a>
<br><br>
<?php 
    }
}
youtube_videos('key', 'id', 'upcoming');