Video Thumbnails
[resolved] DailyMotion not Working (4 posts)

  1. Gee
    Posted 5 years ago #


    Thanks, for this great plugin!

    For those of you who have issue with DailyMotion not fetching the thumbnail. I found that their API use SSL and this plugin use CURL but, in some servers, need a parameter to ignore a certificate check.

    So, there is a quick & dirty fix:

    open the plugin file video-thumbnails.php
    locate the definition of the function "getDailyMotionThumbnail",
    add the following curl option between others:
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    So now, it looks like that:

    // Get DailyMotion Thumbnail
    function getDailyMotionThumbnail($id) {
        if (!function_exists('curl_init')) {
        	return null;
        } else {
    		$ch = curl_init();
    		curl_setopt($ch, CURLOPT_URL, "https://api.dailymotion.com/video/$id?fields=thumbnail_url");
    		curl_setopt($ch, CURLOPT_HEADER, 0);
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    		curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    		$output = curl_exec($ch);
    		$output = json_decode($output);
    		$output = $output->thumbnail_url;
    		return $output;

    I hope this can help somebody and the author will take this in consideration on his next updates.



  2. Sutherland Boswell
    Plugin Author

    Posted 5 years ago #

    Thanks for pointing this out, I thought I had included this same fix originally but it must have slipped by. I'll fix this in the next version.

    Thanks again

  3. Sutherland Boswell
    Plugin Author

    Posted 5 years ago #

    Just released version 1.7.4 which includes this fix

  4. Sabuj Kundu
    Posted 5 years ago #

    Here I got a more easy way http://retrohelix.com/2010/06/youtube-and-dailymotions-thumbnails/ though may be will need to resize the thumb as needed.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Video Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic