diff options
Diffstat (limited to 'lib/vimeo.php')
-rw-r--r-- | lib/vimeo.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/vimeo.php b/lib/vimeo.php deleted file mode 100644 index 0433c5a94..000000000 --- a/lib/vimeo.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -function videolist_parseurl_vimeo($url) { - $parsed = parse_url($url); - $path = explode('/', $parsed['path']); - - if ($parsed['host'] != 'vimeo.com' || !(int) $path[1]) { - return false; - } - - return array( - 'videotype' => 'vimeo', - 'video_id' => $path[1], - ); -} - -function videolist_get_data_vimeo($parsed){ - $video_id = $parsed['video_id']; - - $buffer = file_get_contents("http://vimeo.com/api/v2/video/$video_id.xml"); - $xml = new SimpleXMLElement($buffer); - - $videos = $xml->children(); - $video = $videos[0]; - - return array( - 'title' => sanitize_string($video->title), - 'description' => strip_tags($video->description), - 'thumbnail' => sanitize_string($video->thumbnail_medium), - ); -} |