Get the Thumbnail from a YouTube Video

Tech, rants Add comments

I’ve spent the better part of the frustrating day trying to figure out the new YouTube APIs in relation to PHP. I have a project where I need to retrieve thumbnails from various YouTube videos, and I’ve been making it too hard (I’ve tried integrating the Zend Framework with PHP, Javascript, SimplePie RSS–which is a good tool, it turns out, and all sorts of DOM-reading PHP plugins).

It turns out, the easiest way to retrieve the standard thumbnail for a YouTube video is:

http://img.youtube.com/vi/VIDEO_ID/2.jpg

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in