Ruthlessly stolen from Stackoverflow
1 2 3 4 5 6 7 8 9 10 |
/** * Gets a vimeo thumbnail url * @param mixed $id A vimeo id (ie. 1185346) * @return thumbnail's url */ function getVimeoThumb($id) { $data = file_get_contents("http://vimeo.com/api/v2/video/$id.json"); $data = json_decode($data); return $data[0]->thumbnail_medium; } |