How do I get a YouTube video thumbnail from the YouTube API?

后端 未结 30 2792
Happy的楠姐
Happy的楠姐 2020-11-21 07:06

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?

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-21 07:50

    Just to add/expand on the solutions given, I feel it is necessary to note that, as I had this problem myself, one can actually grab multiple YouTube videos content, in this case, thumbnails, with one HTTP request:

    Using a Rest Client, in this case, HTTPFUL, you can do something like this:

    send();
    
    print ($response);
    
    ?>
    

提交回复
热议问题