YouTube video details from video URL
Get details by YouTube video from video URL.
To get started with YouTube video details, simply run:
composer require fixik/video-details
Next, register the Fixik\VideoDetails\VideoDetailsServiceProvider
in your config/app.php
file:
'providers' => [
// Other service providers...
Fixik\VideoDetails\VideoDetailsServiceProvider::class,
],
<?php
require_once 'vendor/autoload.php';
use Fixik\VideoDetails\VideoDetails;
$url = 'https://www.youtube.com/watch?v=ol23jnhVAOY';
$video_details = VideoDetails::getVideoDetailsByURL($url);
echo '<pre>';
print_r($video_details);
echo '</pre>';
Enable extension=php_curl.dll
in your php.ini
YouTube Video Details is open-sourced software licensed under the MIT license