aboutsummaryrefslogtreecommitdiff
path: root/lib/gisstv.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-04-09 17:05:57 -0400
committerSteve Clay <steve@mrclay.org>2012-04-09 17:05:57 -0400
commitf399afdd2e3cc072efaca069b7a874c7801b31f6 (patch)
treea2f5d4fb13f5d2b142953451f37294d4b8981598 /lib/gisstv.php
parente80bb29671b7887d5749a9eb147be38e6f0401f4 (diff)
downloadelgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.gz
elgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.bz2
switched to platform classes. see https://github.com/Elgg/videolist/issues/4
Diffstat (limited to 'lib/gisstv.php')
-rw-r--r--lib/gisstv.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/gisstv.php b/lib/gisstv.php
deleted file mode 100644
index 24e11340a..000000000
--- a/lib/gisstv.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-function videolist_parseurl_gisstv($url) {
- $parsed = parse_url($url);
- $path = explode('/', $parsed['path']);
-
- if ($parsed['host'] != 'giss.tv' || $path[1] != 'dmmdb') {
- return false;
- }
-
- if($path[2] == 'contents' && isset($path[3])) {
- $video_id = $path[3];
- } elseif($path[3] == 'contents' && isset($path[4])) {
- $video_id = $path[4];
- } else {
- return false;
- }
-
- return array(
- 'videotype' => 'gisstv',
- 'video_id' => $video_id,
- );
-}
-
-function videolist_get_data_gisstv($parsed){
- $video_id = $parsed['video_id'];
-
- $buffer = file_get_contents('http://giss.tv/dmmdb//rss.php');
- $xml = new SimpleXMLElement($buffer);
-
- $data = array();
- foreach($xml->xpath('/rss/channel/item') as $item){
- if(sanitize_string($item->link) == 'http://giss.tv/dmmdb//contents/'.$video_id) {
- $data['title'] = sanitize_string($item->title);
- $data['description'] = strip_tags($item->description);
- $data['thumbnail'] = sanitize_string($item->thumbnail);
- break;
- }
- }
- return $data;
-}