useCached(); $rss->title = "Modern-Explorer's Blogs"; $rss->description = "Blogs i& Travelogues from travellers around the World"; $rss->copyright = 'www.modern-explorer.com'; //optional //$rss->descriptionTruncSize = 500; //$rss->descriptionHtmlSyndicated = true; //$rss->xslStyleSheet = "http://feedster.com/rss20.xsl"; $rss->link = "http://www.modern-explorer.com"; $rss->feedURL = "http://www.modern-explorer.com/".$PHP_SELF; $image = new FeedImage(); $image->title = "Modern-Explorer logo"; $image->url = "http://www.modern-explorer.com/include/graphics/MOD/modern-explorer.gif"; $image->link = "http://www.modern-explorer.com"; $image->description = "Feed provided by modern-explorer.com. Click to visit."; //optional $image->descriptionTruncSize = 500; $image->descriptionHtmlSyndicated = true; $rss->image = $image; if(isset($_GET['user']) && member_exists($_GET['user'])) { $user = get_member_id( $_GET['user']); } else { $user = ''; } diary_list($user, 20); for($i=0; $i < count($diaryentries); $i++){ $ID = stripslashes( $diaryentries[$i][0]); $owner = stripslashes( $diaryentries[$i][1]); $timestamp = $diaryentries[$i][5]; $title = stripslashes( $diaryentries[$i][6]); $city = stripslashes( $diaryentries[$i][2]); $message = nl2br( stripslashes( $diaryentries[$i][7])); //$edate = $diaryentries[$i][8]; $image = $diaryentries[$i][3]; $imagetype = $diaryentries[$i][4]; $country = $diaryentries[$i][9]; $edate = $diaryentries[$i][10]; $alltitle = $title; $url = "http://".get_nick($owner).".modern-explorer.com/action/diary/did/$ID.html"; if( strlen($title) > 40){ $title = substr($title, 0, 40).'...'; } if( strlen($message) > 150){ $message = substr($message, 0, 150).'...'; } $item = new FeedItem(); $item->title = "$title - $city ( $country) ". get_text('by'). " ". get_nick($owner); $item->link = $url; $item->description = "$message
"; //optional //item->descriptionTruncSize = 500; $item->descriptionHtmlSyndicated = true; $item->date = intval($edate); $item->source = $url; $item->author = get_nick($owner); $rss->addItem($item); } $query = "INSERT INTO stats_$this_month"."_$this_year (IP, page, loginID, host, "; $query .= "language, country, browser, platform, website) VALUES"; $query .= "('$env_IP', 'feed', '', '$env_host', "; $query .= "'$l', '$env_country', '$env_browser', '$env_platform', '$ws_code')"; run_query( $query); // valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS echo $rss->saveFeed("RSS0.91", "feed.xml"); ?>