Super simple script to Parse omny FM feed

<?php $html = ""; $rss = "https://omny.fm/feedurl/.rss"; $xml = simplexml_load_file($rss); for($i = 0; $i < 3; $i++){ $title = $xml->channel->item[$i]->title; $description = $xml->channel->item[$i]->description; $pubDate = $xml->channel->item[$i]->pubDate; //audio is inside and enclousure within the item. $audio = $xml->channel->item[$i]->enclosure['url']; //although we have additional variables set above we are only displaying the URL for the Audio and Title below. $html .= "<div class='playPodcast' audioURL='$audio'>$title</div>"; } echo $html; ?>
Snippet for omny RSS Feeds.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.