PHP code example of agusrisan / youtubedownloader
1. Go to this page and download the library: Download agusrisan/youtubedownloader 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/ */
agusrisan / youtubedownloader example snippets
$yt = new \YoutubeDownloader\YoutubeDownloader();
$registrationResponse = $yt->registerDevice();
//or
$yt->registerIdKey("id", "key");
$playerResponse = $yt->playerRequest->fetch_player_info('video_id_comes_here');
//to se some output you can
echo $playerResponse->serializeToJsonString();