<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OSTalks &#187; longtail media player</title>
	<atom:link href="http://www.ostalks.com/tag/longtail-media-player/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ostalks.com</link>
	<description>Open Source, Operating Systems, Offtopic Stuff!</description>
	<lastBuildDate>Fri, 04 Nov 2011 13:16:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mypodcast.com Feeds and Longtailvideo Media Player</title>
		<link>http://www.ostalks.com/2009/09/20/mypodcast-com-feeds-and-longtailvideo-media-player/</link>
		<comments>http://www.ostalks.com/2009/09/20/mypodcast-com-feeds-and-longtailvideo-media-player/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 07:51:38 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[longtail media player]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[simplepie]]></category>

		<guid isPermaLink="false">http://ostalks.wordpress.com/?p=69</guid>
		<description><![CDATA[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.]]></description>
			<content:encoded><![CDATA[<p>The religious community that I&#8217;m in delves into media.  In fact we have a website that showcases video and audio materials for free.</p>
<p>We use the ever popular video/media flash player made by <a href="http://www.longtailvideo.com/players/jw-flv-player/">Longtail Video</a> to stream our mp3 and video files to be distributed and seen by people in the web.</p>
<p>As we host our mp3 files in mypodcast.com, the rss feed that is delivered my the site isn&#8217;t exactly compatible with the player &#8211; so I had to parse the rss feed and re encode it into an rss feed that the longtail player recognizes.</p>
<p>In order to not reinvent the wheel in reading rss feeds, I used the ever popular open source (BSD-licensed) php feed reader, <a href="http://simplepie.org">simplepie</a>.</p>
<p>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!</p>
<p><code><br />
&lt;?<br />
require_once('simplepie.inc');</code></p>
<p>$feed = new SimplePie(&#8216;http://host/rss.xml&#8217;);<br />
set_cache_location($_SERVER['DOCUMENT_ROOT'] . &#8216;/cache/&#8217;);</p>
<p>$feed-&gt;handle_content_type();</p>
<p>?&gt;</p>
<p>rss feed name<br />
get_items() as $item)<br />
{<br />
$title = $item-&gt;get_title();<br />
$date = $item-&gt;get_date();<br />
if ($enclosure = $item-&gt;get_enclosure())<br />
{<br />
$media = $enclosure-&gt;get_link();<br />
$length = $enclosure-&gt;get_duration(true);<br />
}<br />
$subtitle = $item-&gt;subtitle;<br />
$description = $item-&gt;get_description();<br />
//print_r($enclosure);<br />
$desc = explode(&#8220;&#8221;,&#8221;",$image);<br />
echo &#8221;</p>
<p>$title<br />
$author</p>
<p>&#8220;;<br />
}<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2009/09/20/mypodcast-com-feeds-and-longtailvideo-media-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

