PHP code example of corbpie / yt-api

1. Go to this page and download the library: Download corbpie/yt-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

corbpie / yt-api example snippets




use Corbpie\YouTubeApiClass\YTAPI;

$yt = new YTAPI();

$yt->setChannelId('UCWJ2lWNubArHWmf3FIHbfcQ');
$yt->getVideoSearch('Jordan', 'viewCount', 25);

$yt->getVideoSearch('Jordan', 'viewCount', 25);

$yt->setChannelId('UCWJ2lWNubArHWmf3FIHbfcQ');
$yt->getVideoSearch('', 'date', 25);

$yt->setVideoId('1fjhIWJSxfw');
$yt->getVideoData();

$yt->setChannelId('UCWJ2lWNubArHWmf3FIHbfcQ');
$yt->getChannelData();

$call->getChannelPlaylistsData(50);

$yt->setPlaylistId('UCWJ2lWNubArHWmf3FIHbfcQ');
$yt->getPlaylistsData();
src/YTAPI.php