You can use YouTube video related information using YouTube API, using this API you can retrieve details such as video thumbnails, caption, description, statistics and more. You just need to obtain the YouTube key and create a videos: list request:
$data = file_get_contents("https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY&part=snippet&id=ABOthijGKLj");
$json = json_decode($data);
var_dump($json->items[0]->snippet->thumbnails);
In YouTube API V3 we can also use these URLs for getting video thumbnails.They are classified on the basis of
their quality.
https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/default.jpg - default
https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg - medium
https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg - high
https://i1.ytimg.com/vi/<insert-youtube-video-id-here>/sddefault.jpg - standard
0 Comment(s)