Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Setting up an RSS FEED in advance?

  • 06-01-2008 10:25PM
    #1
    Closed Accounts Posts: 238 ✭✭


    Hi,

    I'm webmaster for a few sites. I haven't used RSS feeds yet at all. But I currently need a table on my site to show different data every day... the data being pre entered for that specific day, and sitting ready for several days to follow.

    Can anyone point me in the direction of where I'd find this?

    And is there a better approach to this rather than RSS? (I'm looking at RSS as I wouldn't mind learning a bit more about using it!)

    Joe


Comments

  • Registered Users, Registered Users 2 Posts: 3,485 ✭✭✭randombar


    rss is really pretty simple I just use the file feedcreator and some php:
    <?php require_once('xxxxxxxx'); 
    include("feedcreator.class.php");
    $rss = new UniversalFeedCreator();
    $rss->useCached();
    $rss->title = "Rate My Pub";
    $rss->description = "Our easy-to-use website allows you to rate pubs in every corner of Ireland";
    $rss->link = "http://www.ratemypub.ie/ratemypub.rss";
    $rss->syndicationURL = "http://www.ratemypub.ie/".$PHP_SELF;
    
    
    
    // get your news items from somewhere, e.g. your database:
    mysql_select_db($database_connRate, $connRate);
    $res = mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 0 , 20");
    while ($data = mysql_fetch_object($res)) {
        $item = new FeedItem();
        $item->id = $data->id;
        $item->title = $data->title;
        $item->link = $data->url;
        $item->description = $data->short;
        $item->date = $data->newsdate;
        $item->source = "http://www.ratemypub.ie";
        $item->author = "The Rate My Pub Team";
        
        $rss->addItem($item);
    }
    
    $rss->saveFeed("RSS1.0", "ratemypub.rss");
    
    


  • Closed Accounts Posts: 238 ✭✭chat2joe


    I don't really want to involve a database in it...

    would an xml file be the way to go?

    Just want the page to fly through the file to todays date.... display the info entered for that day (going to probably be a html table... or might have to parse into a table).


  • Registered Users, Registered Users 2 Posts: 3,485 ✭✭✭randombar


    I think from what I know xml is the way to go?

    instead of the php going through the database just let it read the page that the data has been changed on?


Advertisement