title = 'Combined BIOME news plus OMNI and VetGate latest additions'; $rss->description = 'This is a combined RSS feed made up of RSS feeds from BIOME including latest news and latest additions to the OMNI and VetGate gateways'; $rss->link = 'http://www.biome.ac.uk/'; $rss->RSSURL = "http://".$_SERVER["SERVER_NAME"].htmlspecialchars($_SERVER["REQUEST_URI"]); # Now foreach date print out the list of items for that day using the URLs as keys # This ensures de-duping too. :) foreach($these_keys as $this_key){ foreach($date_hash[$this_key] as $this_link){ $item = new RSSItem(); $this_item = $flat_item_list[$this_link]; # Tricky set of regex's where order is critical to sort out ampersand encoding # should check its not rsscreator that's messing things up here $this_item['description'] = preg_replace("/&/","&", $this_item['description']); $this_item['description'] = preg_replace("/&/","&", $this_item['description']); $this_item['description'] = preg_replace("/\b&\b/"," & ", $this_item['description']); $item->title = $this_item['title']; $item->description = $this_item['description']; $item->link = $this_item['link']; $item->date = $this_item['date']; $rss->addItem($item); } } $output = $rss->createRSS($version); # Call an external script to parse out MS meta characters which break validation include('strip_ms_chars.php'); function get_url($this_url){ $error_level_stored = error_reporting() ; error_reporting( $error_level_stored & ~ E_NOTICE ) ; require_once("magpierss-0.72/extlib/Snoopy.class.inc"); $snoopy = new Snoopy; $snoopy->read_timeout = 5; if( ! $snoopy->fetch( $this_url ) || ! $snoopy->results ) { if (!empty($snoopy->error)) { $this->_setErrors('Could not open ' .$this_url ." snoopy status=".$snoopy->error); return false; } else { $this->_setErrors('Could not open ' .$this_url); return false; } } $xml = $snoopy->results ; error_reporting( $error_level_stored ) ; return $xml; } ?>