Jump to content

RSS Feeds

How do you do it?

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

RSS Feeds How do you do it? Rate Topic: -----

#1 User is offline   azilaka 

  • W.R. Private
  • Group: Members
  • Posts: 27
  • Joined: 11-July 07
  • Gender:Female

Post icon  Posted 03 August 2007 - 06:09 AM

Hi.. I'm not sure if this is the right forum for this question, but is there a way to add an RSS feed directly to your site, with a page created by your self without going through one of those 'free-dowload-code' sites or widget sites? I only ask because, I was wondering whether this would make the rss feeds dowload any faster.
Please inform me ^_^
0

#2 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 03 August 2007 - 06:13 AM

This article is lengthy, but explains it all very well: http://searchenginew...ml?page=2175271
0

#3 User is offline   azilaka 

  • W.R. Private
  • Group: Members
  • Posts: 27
  • Joined: 11-July 07
  • Gender:Female

Posted 03 August 2007 - 08:38 AM

thanks herkalees! you are the man.
0

#4 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 03 August 2007 - 09:14 AM

No, you are! :borat:
0

#5 User is offline   pgo 

  • W.R. Corporal
  • Group: Members
  • Posts: 83
  • Joined: 07-September 07
  • Gender:Male
  • Location:Oklahoma, USA

Posted 07 September 2007 - 04:20 PM

For your edification, here's how I do it on one of my sites (with PHP):

$get_latest = $db->query("SELECT * FROM spoems ORDER BY sub_time DESC LIMIT 0, 10");
if ($get_latest->num_rows > 0) {
	echo '<?xml version="1.0"?>' . $config['eol'];
	echo '<rss version="2.0">' . $config['eol'];
	echo '	<channel>' . $config['eol'];
	echo '		<title>Spoetic.com RSS</title>' . $config['eol'];
	echo '		<link>http://spoetic.com</link>' . $config['eol'];
	echo '		<description>RSS feed of the most recent spoems posted on Spoetic.com.</description>' . $config['eol'];
	echo '		<language>en-us</language>' . $config['eol'];
	$i = 0;
	while ($row = $get_latest->fetch_assoc()) {
		$pub_date = date('D, d M Y H:i:s', strtotime($row['sub_time']));
		if ($i < 1)
		{
			echo '		<pubDate>' . $pub_date . '</pubDate>' . $config['eol'];
		}
		echo '		<item>' . $config['eol'];
		echo '			<title>Spoem #' . $row['id'] . '</title>' . $config['eol'];
		echo '			<link>http://spoetic.com/view/' . $row['id'] . '/</link>' . $config['eol'];
		echo '			<description><![CDATA[' . $row['spoem'] . ']]></description>' . $config['eol'];
		echo '			<pubDate>' . $pub_date . '</pubDate>' . $config['eol'];
		echo '		</item>' . $config['eol'];
		$i++;
	}
	echo '	</channel>' . $config['eol'];
	echo '</rss>' . $config['eol'];
}


Easy as pie. :)

This post has been edited by pgoneill: 07 September 2007 - 04:21 PM

0

#6 User is offline   azilaka 

  • W.R. Private
  • Group: Members
  • Posts: 27
  • Joined: 11-July 07
  • Gender:Female

Post icon  Posted 12 September 2007 - 09:16 AM

Thanks, that was useful. For future reference. Cheers!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users