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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

reading rss feeds from site

  • 01-12-2005 3:45pm
    #1
    Registered Users, Registered Users 2 Posts: 7,518 ✭✭✭


    Hi

    I'm adding a section to a site that will read an rss feed from a news site and display the headlines on my site.

    I have the php section done that will read the feed from the other site.

    I was just wondering which option people this is better.

    Having a script that will automatically read the feed once or twice a day and add the information into a database.
    Then my display script reads from the database.

    or

    Everytime a user tries to lookup the page it connects to the news site and reads the feed.

    matrim


Comments

  • Registered Users, Registered Users 2 Posts: 304 ✭✭PhantomBeaker


    What's the feed like?

    Actually that would determine how often you read the feed. If you're getting an rss from sourceforge, it's not going to update as much as slashdot. So lots of scripts try and grab it at 1 hour intervals, and cache it. I'm sure with some high traffic sites you may want to update more frequently.

    The way I'd think of it is as follows: Think of the traffic to your site. If you're hitting the site more times to cache your feed than you get hits, I'd say just have it hit on a per-user basis. If you have more users, then you're just adding to their bandwidth load which is unfair, and is probably faster if you just fetch it from a cache.

    So your amount of users would determine whether you use a cache or not, and how quickly the feed is likely to update determines how often you update your cache.

    Take care,
    Aoife


  • Closed Accounts Posts: 382 ✭✭misterq


    if your site has a low level of traffic and you aren't grabbing much data, then maybe you could get away with loading it each time there is a visitor.

    The other drawback of this method is your script taking ages to time out and/or throw an error if the rss feed on the external site isn't available for some reason.

    Otherwise it would be best to store it in a database or text file.


  • Registered Users, Registered Users 2 Posts: 7,518 ✭✭✭matrim


    The feed is a new feed from rte. There will probably more from different sites after.

    The site has low traffic site so I'll probably go with the option of getting on a per user basis.

    Thanks


Advertisement