For youtube I use something like this:
<img class="video-thumbnail" src="http://img.youtube.com/vi/<?php echo $video_id; ?>/0.jpg" alt="" width="190">
where
$video_id is the code of that video from url.
Can I do something similar for Dailymotion videos
Just a simpler way for above objective. Suppose following is the url that I want to download thumbnail
http://www.dailymotion.com/video/x17pcar_hadoop-tutorial-how-to-index-and-search-data-with-solr_tech
From this url get last string and Extract string id
Now split above string on underscorebasis (_). First one is video id i.e.
x17pcar
Now run following url using id to get thumbnail
http://www.dailymotion.com/thumbnail/video/x17pcar
You just need to add an extra
thumbnail
into the link.Video URL
Thumbnail URL
Using the Dailymotion API
https://api.dailymotion.com/video/VIDEO_ID?fields=field1,field2,...
Replace field1,field2 with
This API request does not require any Access Tokens.
Example : https://api.dailymotion.com/video/xjfn0s?fields=thumbnail_small_url
This HTTP request returns a JSON data with the image link of the video. For processing JSON data check PHP Manual - JSON Decode
EDIT As suggested by Ravi using http://www.dailymotion.com/thumbnail/video/
video_id
is pretty straight forward. But different resolution images use the API