This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to: Free Software Foundation, Inc. 59 Temple Place - Suite 330 Boston, MA 02111-1307, USA. */ have ("rss"); need ("cache"); need ("html"); function displayRSSFeed ($url, $showChannelInfo) { $channelRegEx = ':.*?(.*?).*?(.*?).*?(.*?).*?:s'; $itemRegEx = ':.*?(.*?).*?(.*?).*?(.*?).*?:s'; // grab the file $data = implode ('', cachedURL ($url)); if ($showChannelInfo) { // Channel information if ($itemCount = preg_match ($channelRegEx, $data, $info)) { $channelTitle = $info[1]; $channelLink = $info[2]; $channelDesc = $info[3]; echo "

" . convertFromHTML ($channelTitle) . "

"; } } if (!($itemCount = @preg_match_all ($itemRegEx, $data, $info))) { echo "No items found."; return; } for ($i = 0; $i < $itemCount; $i++) { $title = $info[1][$i]; $link = $info[2][$i]; $desc = $info[3][$i]; echo "

" . convertFromHTML ($title) . "

\n"; } } function slashdot () { displayRSSFeed ('http://rss.slashdot.org/Slashdot/slashdot', false); } ?>