School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,363 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,426 people online right now. Registration is fast and FREE... Join Now!




RSS feed suggestions

 

RSS feed suggestions

SixOfEleven

23 Jun, 2009 - 05:40 AM
Post #1

Code Guru
Group Icon

Joined: 18 Oct, 2008
Posts: 2,906



Thanked: 165 times
Dream Kudos: 725
Expert In: C, C#, XNA, Game Programming, Programming Concepts

My Contributions
My new web site is taking off. I want to create an RSS feed so visitors can get the latest news about the site with out going to my site. I googled RSS and I've found the format of an RSS feed. I was just wondering if somebody could suggest a good, hopefully free, tool for creating an RSS feed and a good tutorial for getting started.

User is online!Profile CardPM
+Quote Post


gregwhitworth

RE: RSS Feed Suggestions

23 Jun, 2009 - 07:29 AM
Post #2

(this).problem + "sucks";
Group Icon

Joined: 20 Jan, 2009
Posts: 1,131



Thanked: 82 times
Dream Kudos: 50
Expert In: HTML, CSS, Web Design

My Contributions
Well, I know that it is popular to add your feed to Feed Burner, this allows for statistics on your feed.

If you are building the feed statically then it is completely up to you. These guys have a great RSS tutorial:

http://searchenginewatch.com/2175271

Let me know if you need anything else.

--

Greg
User is offlineProfile CardPM
+Quote Post

firebolt

RE: RSS Feed Suggestions

23 Jun, 2009 - 09:54 PM
Post #3

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,463



Thanked: 75 times
Dream Kudos: 1675
My Contributions
Here we go:
http://sourceforge.net/projects/rssfeedcreator/
http://rssfeedreader.com/
http://www.magic-rss.com/
http://au.feedzilla.com/?c=&kw=&ca...mp;prov=&f=
http://www.thefreedictionary.com/lookup.htm
http://www.rssreader.com/
User is online!Profile CardPM
+Quote Post

sam_benne

RE: RSS Feed Suggestions

2 Jul, 2009 - 03:48 PM
Post #4

D.I.C Addict
Group Icon

Joined: 16 Jan, 2008
Posts: 635



Thanked: 8 times
Dream Kudos: 400
My Contributions
I have created a script that dynamically makes my RSS feed using php. It doesn't give statistics like feed burner it just creates the feed. If you have the basic structure you can create a script that does it for you from a database.
User is offlineProfile CardPM
+Quote Post

BetaWar

RE: RSS Feed Suggestions

2 Jul, 2009 - 08:47 PM
Post #5

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 4,729



Thanked: 269 times
Dream Kudos: 1400
My Contributions
QUOTE
I have created a script that dynamically makes my RSS feed using php

As have I, it isn't that difficult to accomplish. I will post the script if you want (and I can find it). It is basically just an htaccess line to make the feed.xml file run as a php file, and then a php file that outputs valid RSS/XML feed.
User is offlineProfile CardPM
+Quote Post

SixOfEleven

RE: RSS Feed Suggestions

2 Jul, 2009 - 10:10 PM
Post #6

Code Guru
Group Icon

Joined: 18 Oct, 2008
Posts: 2,906



Thanked: 165 times
Dream Kudos: 725
Expert In: C, C#, XNA, Game Programming, Programming Concepts

My Contributions
The script would be great if my host allowed PHP on their Windows servers! sad.gif I've come up with a good solution though. I have a blog that runs in parallel with the site. If there is news on the site, I make an entry on the blog. The blog has an RSS feed so my viewers can subscribe to that. Thanks for the help though. smile.gif

I would still be interested in seeing the scripts. PHP is something that I'm looking into to trying at some point on my web development earning path. smile.gif
User is online!Profile CardPM
+Quote Post

BetaWar

RE: RSS Feed Suggestions

2 Jul, 2009 - 10:25 PM
Post #7

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 4,729



Thanked: 269 times
Dream Kudos: 1400
My Contributions
Okay, found it:
rss.php

<?php
header("Content-type: application/xml");
require'dbinit.php';

$content = "
<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>
<rss version=\"2.0\">
<title>ReigningGames</title>
<description>A site dealing with all aspects of gaming</description>
<link>http://reigninggames.com</link>
<copyright>Copyright 2006+</copyright>
<webMaster>webmaster@reigninggames.com (ReigningGames)</webMaster>
<generator>RS Blogs</generator>
<channel>";

//WHERE open='1'
$query = mysql_query("SELECT * FROM topics ORDER BY tid DESC LIMIT 15");
while($result = mysql_fetch_array($query)){

$qtwo = mysql_query("SELECT * FROM posts WHERE nt = '1' AND tid = '" . $result['tid'] . "' LIMIT 1");
$row = mysql_fetch_array($qtwo);

$title = stripslashes(htmlentities(strip_tags($result['title'])));
$desc = stripslashes(htmlentities(strip_tags($row['content'],'ENT_QUOTES')));
$link = 'http://www.reigninggames.com/tests/mblog/index.php?bid=' . $result['bid'] . '&tid=' . $result['tid'] . '';
$time = strftime( "%a, %d %b %Y %T %Z" , $result['pubDate']);

$content .= "
<item>
<title><![CDATA[ " . $title . " ]]></title>
<description>" . $desc . "</description>
<link><![CDATA[" . $link . "]]></link>
<guid><![CDATA[" . $link . "]]></guid>
<pubDate>" . $time . "</pubDate>
</item>";

}

$content .="
</channel>
</rss>";
echo $content;
?>


It is pretty straight forward I think. Now, I am not positive it is as optimized as it could be. I made this back when I was just glad if it worked smile.gif
User is offlineProfile CardPM
+Quote Post

sam_benne

RE: RSS Feed Suggestions

3 Jul, 2009 - 12:41 AM
Post #8

D.I.C Addict
Group Icon

Joined: 16 Jan, 2008
Posts: 635



Thanked: 8 times
Dream Kudos: 400
My Contributions
This is what I use. It grabs the data from a database.
CODE

<?php
    header("Content-type: text/xml");
    echo '<?xml version="1.0" encoding="UTF-8" ?>';
    // Set RSS version.
    echo "<rss version='2.0'> ";
    // Start the XML.
    echo "
        <channel>
        <title>Benoks News</title>
        <description>This is the latest news from the Benoks Team.</description>
        <link>http://www.benoks.co.uk/</link>";
    // Create a connection to your database.
    require("functions.php");
    // Query database and select the last 10 entries.
    $data = mysql_query("SELECT * FROM news ORDER BY id DESC");
    while($row = mysql_fetch_array($data))
    {
        // Continue with the 10 items to be included in the <item> section of the XML.
        echo "
        <item>
        <link>http://www.benoks.co.uk/news&amp;id=".$row[id]."</link>
        <guid isPermaLink=\"true\">http://www.benoks.co.uk/news&amp;id=".$row[id]."</guid>
        <title>".$row[title]."</title>
        <description><![CDATA[".$row[message]."]]></description>
        <pubDate>".$row[date]."</pubDate>
        </item>";
    }
    echo "
    </channel>
    </rss>";
?>

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 08:36PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month