In PHP try…
$pubDate = $our__date; $pubDate= date("D, d M Y H:i:s O", strtotime($pubDate));
In PHP try…
$pubDate = $our__date; $pubDate= date("D, d M Y H:i:s O", strtotime($pubDate));
The Ausca ruby gem features an RSS joiner module that can be used to combine multiple RSS feeds into a single RSS feed.
This functionality is useful for creating scraper and news sites which aggregate news from outside sources.
As seen on http://sourcey.com/combining-multiple-rss-feeds/
This is a simple script that grabs a rss file and converts it to json.
It was copied from http://onwebdev.blogspot.com/2011/08/php-converting-rss-to-json.html but it has some little changes that will work 100%!
In fact the original code was putting every title, description, pubDate and guid in a new array entry.
$feed = new DOMDocument(); $feed->load('file.rss'); $json = array(); $json['title'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('title')->item(0)->firstChild->nodeValue; $json['description'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('description')->item(0)->firstChild->nodeValue; $json['link'] = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('link')->item(0)->firstChild->nodeValue; $items = $feed->getElementsByTagName('channel')->item(0)->getElementsByTagName('item'); $json['item'] = array(); $i = 0; foreach($items as $key => $item) { $title = $item->getElementsByTagName('title')->item(0)->firstChild->nodeValue; $description = $item->getElementsByTagName('description')->item(0)->firstChild->nodeValue; $pubDate = $item->getElementsByTagName('pubDate')->item(0)->firstChild->nodeValue; $guid = $item->getElementsByTagName('guid')->item(0)->firstChild->nodeValue; $json['item'][$key]['title'] = $title; $json['item'][$key]['description'] = $description; $json['item'][$key]['pubdate'] = $pubDate; $json['item'][$key]['guid'] = $guid; } echo json_encode($json);