Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Setting up an RSS FEED in advance?

Options
  • 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 Posts: 3,401 ✭✭✭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 Posts: 3,401 ✭✭✭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