_title = $title; } public function __get($name) { if ($name == 'encoding') return $this->_encoding; if ($name == 'title') return $this->_title; if ($name == 'language') return $this->_language; if ($name == 'description') return $this->_description; if ($name == 'generator') return $this->_generator; if ($name == 'link') return $this->_link; } public function __set($name, $value) { if ($name == 'encoding') $this->_encoding=stripslashes($value); if ($name == 'title') $this->_title=stripslashes($value); if ($name == 'language') $this->_language=stripslashes($value); if ($name == 'description') $this->_description=stripslashes($value); if ($name == 'generator') $this->_generator=stripslashes($value); if ($name == 'link') $this->_link=stripslashes($value); } /** Make an xml document of the rss stream @param: items: n row of associative array with theses field: 'title': title of the item 'description': short description of the item 'pubData': publication timestamp of the item 'link': url to show the item @result: xml document of rss stream **/ public function get($items) { $res=""; // header $res.="_encoding."\"?>\n"; $res.="_version."\">\n"; $res.="\t\n"; $res.="\t\t".$this->_title."\n"; $res.="\t\t".$this->_description."\n"; $res.="\t\t".$this->_link."\n"; $res.="\t\t".$this->_language."\n"; $res.="\t\t".$this->_generator."\n"; //items foreach($items as $item) { //$date = date("r", stripslashes($item["pubDate"])); $res.="\t\t\n"; $res.="\t\t\t".stripslashes($item["title"])."\n"; $res.="\t\t\t".stripslashes($item["description"])."\n"; if (!empty($item["pubDate"])) $res.="\t\t\t".date("r", stripslashes($item["pubDate"]))."\n"; if (!empty($item["link"])) $res.="\t\t\t".stripslashes($item["link"])."\n"; $res.="\t\t\n"; } //footer $res.="\t\n"; $res.="\n"; return $res; } } ?>
Fatal error: Class 'Rss_Generator' not found in /var/www/vhosts/bodyba/htdocs/rss-articles.php on line 59