Thumbnails that you can download from the video URL.
URL VIDEO
http:
URL THUMBNAIL
http://i1.ytimg.com/vi/Xzf0rvQa4Mc/default.jpg http://i2.ytimg.com/vi/Xzf0rvQa4Mc/default.jpg http://i3.ytimg.com/vi/Xzf0rvQa4Mc/default.jpg http://i4.ytimg.com/vi/Xzf0rvQa4Mc/default.jpg
It takes some time to replicate images to all thumbnail designs (possibly servers) for new videos.
If there is no thumbnail, it returns the image with the camera (exactly 893 bytes).
Example
http://i4.ytimg.com/vi/Xzf0rvQa4Md/default.jpg
if you want to get the video game id yout you like this
better with that
regexp (youtube\.com\/(watch\?v=)?(v\/)?([\w\-]+))
it can handle both URLs (with /v/ and with watch?v=)
preg_match('/youtube\.com\/v\/([\w\-]+)/', $code, $match); echo $match[3];
source share