msu libraries lifestream

What is this all about?

View code | Get code

"http://feeds.feedburner.com/msulibrarySpotlight", "video" => "http://www.youtube.com/rss/user/msulibrary/videos.rss", "link" => "http://feeds.delicious.com/v2/rss/diginit/msulib-pub", "picture" => "http://api.flickr.com/services/feeds/photos_public.gne?id=7901131@N06&format=rss_200", "song" => "http://ws.audioscrobbler.com/1.0/user/jaclark/recenttracks.rss", /*removed due to twitter api change - JC 3/3/2014 "message" => "http://twitter.com/statuses/user_timeline/3175741.rss"*/ ); $details = array("title","link"); $list = array(); $rss = new DOMDocument(); foreach ($feeds as $name => $feed) { $rss -> load($feed); $items = $rss -> getElementsByTagName("item"); foreach ($items as $item) { if ($item -> getElementsByTagName("pubDate") -> item(0)) { $date = $item -> getElementsByTagName("pubDate") -> item(0) -> nodeValue; } else { $date = $item -> getElementsByTagName("date") -> item(0) -> nodeValue; } $date = strtotime(substr($date,0,25)); $list[$date]["name"] = $name; foreach ($details as $detail) { $list[$date][$detail] = $item -> getElementsByTagName($detail) -> item(0) -> nodeValue; } } } krsort($list); $day = ""; foreach ($list as $timestamp => $item) { $this_day = date("F jS",$timestamp); if ($day != $this_day) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $day = $this_day; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } ?>
"; echo $this_day; echo "
"; echo ""; echo date("g:ia",$timestamp); echo ""; echo ""; echo ""; echo $item["title"]; echo ""; echo ""; echo "\"";"; echo "