If I have a YouTube video URL, is there any way to use PHP and cURL to get the associated thumbnail from the YouTube API?
Here is a simple function I created for getting the thumbnails. It is easy to understand and use.
$link is the YouTube link copied exactly as it is in the browser, for example, https://www.youtube.com/watch?v=BQ0mxQXmLsk
function get_youtube_thumb($link){
$new = str_replace('https://www.youtube.com/watch?v=', '', $link);
$thumbnail = 'https://img.youtube.com/vi/' . $new . '/0.jpg';
return $thumbnail;
}