PHP code example of madcodez / youtube-downloader

1. Go to this page and download the library: Download madcodez/youtube-downloader 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/ */

    

madcodez / youtube-downloader example snippets


$yt = new YTDownloader();

$links = $yt->getDownloadLinks("ffxKSjUwKdU");

print_r($links);

$yt = new YTDownloader();

$links = $yt->getDownloadLinks("https://www.youtube.com/watch?v=ffxKSjUwKdU");

print_r($links);