From 34e4ad8ba5e0a77b797f24ed9af1cee6dce82c36 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 10 Nov 2011 23:03:58 +0100 Subject: Refactored library. One file per videotype. --- lib/bliptv.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/bliptv.php (limited to 'lib/bliptv.php') diff --git a/lib/bliptv.php b/lib/bliptv.php new file mode 100644 index 000000000..f4c0f772c --- /dev/null +++ b/lib/bliptv.php @@ -0,0 +1,29 @@ + 'bliptv', + 'video_id' => $parsed['path'], + ); +} + +function videolist_get_data_bliptv($parsed){ + $video_id = $parsed['video_id']; + + $buffer = file_get_contents('http://blip.tv'.$video_id.'?skin=rss'); + $xml = new SimpleXMLElement($buffer); + + return array( + 'title' => sanitize_string(current($xml->xpath('/rss/channel/item/title'))), + 'description' => strip_tags(current($xml->xpath('/rss/channel/item/description'))), + 'thumbnail' => sanitize_string(current($xml->xpath('/rss/channel/item/media:thumbnail/@url'))), + 'embedurl' => sanitize_string(current($xml->xpath('/rss/channel/item/blip:embedUrl'))), + ); +} -- cgit v1.2.3