Mam klasę:
<?php class rss_parser { var $update_interval = 60; var $data_directory = \"/home/neoprog/www/rss\"; var $rss_url; var $num_to_show; var $do_update; var $content; var $feed_title; var $feed_link; var $feed_description; var $my_html; function rss_parser($url, $numtoshow = 10, $html = \"\", $update = 0) { $this->rss_url = $url; $this->num_to_show = $numtoshow; $this->do_update = $update; $this->content = $this->fetch_feed(); $this->parse_feed(); $this->show(); } function fetch_feed() { $filename = $url_parts['host'] . str_replace(\"/\", \",\", $url_parts['path']) . \"_\" . @$url_parts['query']; $update = 1; } } else { $create= 1; } if($create == 1 || ($this->do_update == TRUE && $update == 1)) { if (!$fp) { \n\"; return; } .\"Host: \" . $url_parts['host'] . \"r\n\" .\"User-Agent: Drew's RSS Reader 0.1r\n\" .\"Connection: Closer\nr\n\"); } if(!$output) { return $rss_data; } else { } } //update } /* void */ function parse_feed() { $this->feed_title = @$title[1]; $this->feed_link = @$link[1]; $this->feed_description = @$description[1]; \n\"; } preg_match_all(\"/(?:<([w:]*)[^>]*>(?:)?)+?/si\", preg_replace(\"/]*>/\", \"\", $items[0][$i]), $elements); $elements[1][$j] = str_replace(\":\", \"__\", $elements[1][$j]); //regex fix for items with : like dc:date } } } function show() { if($this->my_html == \"\") { $this->show_html(); } else { $this->show_user_html(); } } function show_html() { for($i = 0; $i < $show; ++$i) { \n\"; } } function show_user_html() { for($i = 0; $i < $show; ++$i) { } } } // end class ?>
Ok poradziłem już sobie. Można zamknąć.