PHP code example of madcoda / php-youtube-api

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

    

madcoda / php-youtube-api example snippets



$youtube = new Madcoda\Youtube\Youtube(array('key' => '* Your API key here *'));
$video = $youtube->getVideoInfo('rie-hPVJ7Sw');

$video = Youtube::getVideoInfo(Input::get('vid', 'dQw4w9WgXcQ');
sh
$ composer