children('http://search.yahoo.com/mrss/');
$info = array();
$info['id'] = $video_id;
$info['title'] = (string)$media->group->title;
$info['description'] = (string)$media->group->description;
$info['thumb'][0] = (string)$media->group->thumbnail[0]->attributes()->url;
$info['thumb'][1] = (string)$media->group->thumbnail[1]->attributes()->url;
$info['thumb'][2] = (string)$media->group->thumbnail[2]->attributes()->url;
$info['thumb'][3] = (string)$media->group->thumbnail[3]->attributes()->url;
$info['embed'] = '';
return($info);
}
private static function video_get_vimeo($url, $width = 640, $height = 360)
{
preg_match('/vimeo\.com\/([0-9]{1,10})/', $url, $matches);
$video_id = $matches[1];
// Check if a valid url
if(!Net::check_http_code('http://vimeo.com/api/v2/video/'.$video_id.'.php',200))
{
return(false);
}
$hash = unserialize(file_get_contents('http://vimeo.com/api/v2/video/'.$video_id.'.php'));
$info = array();
$info['id'] = $video_id;
$info['title'] = $hash[0]['title'];
$info['description'] = $hash[0]['description'];
$info['thumb'][0] = $hash[0]['thumbnail_medium'];
$info['thumb'][1] = $hash[0]['thumbnail_small'];
$info['embed'] = '';
return($info);
}
}
?>