function check_daily_motion() { if (preg_match('#=["\']http://www.dailymotion.com/swf/([^&"\']+)#i', $this->html, $match) && (preg_match('/dailymotion\\.com/', $this->parsed_url['host']) || !$this->check_in_other($match[1]))) { $video_id = $match[1]; if ($this->debug) { echo "<!-- Detect Daily Motion Video, id: {$video_id} -->\n"; } if ($video_id) { $url = $this->get_daily_motion_thumb($video_id); if ($url) { $img = new BasicThumb($url); if ($img->get()) { $img->type = 'local'; $img->candidate = true; $this->selected = $img; if ($this->debug) { echo "<!-- Video selected from {$img->url} -->\n"; } return $this->selected; } } } } return false; }