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'));
$video = $youtube->getVideoInfo('rie-hPVJ7Sw');
use Madcoda\Youtube\Http\HttpClientInterface;
class MyClient implements HttpClientInterface
{
public function get($url, array $params)
{
// return the raw, undecoded response body
}
}
$youtube = new Madcoda\Youtube\Youtube(array('key' => 'YOUR API KEY'));
$youtube->setHttpClient(new MyClient());
sh
php artisan vendor:publish --provider="Madcoda\Youtube\YoutubeServiceProviderLaravel5"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.