Loading...

Mypodcast.com Feeds and Longtailvideo Media Player

The religious community that I’m in delves into media. In fact we have a website that showcases video and audio materials for free.

We use the ever popular video/media flash player made by Longtail Video to stream our mp3 and video files to be distributed and seen by people in the web.

As we host our mp3 files in mypodcast.com, the rss feed that is delivered my the site isn’t exactly compatible with the player – so I had to parse the rss feed and re encode it into an rss feed that the longtail player recognizes.

In order to not reinvent the wheel in reading rss feeds, I used the ever popular open source (BSD-licensed) php feed reader, simplepie.

Below this page is the quick and dirty code that I used. I hope this will help you get started in the world of podcasting!


<?
require_once('simplepie.inc');

$feed = new SimplePie(‘http://host/rss.xml’);
set_cache_location($_SERVER[‘DOCUMENT_ROOT’] . ‘/cache/’);

$feed->handle_content_type();

?>

rss feed name
get_items() as $item)
{
$title = $item->get_title();
$date = $item->get_date();
if ($enclosure = $item->get_enclosure())
{
$media = $enclosure->get_link();
$length = $enclosure->get_duration(true);
}
$subtitle = $item->subtitle;
$description = $item->get_description();
//print_r($enclosure);
$desc = explode(“”,””,$image);
echo ”

$title
$author

“;
}
?>

 
 

Leave a Reply

Your email address will not be published. Required fields are marked *