RSS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Danny

    RSS

    Hi
    I was thinking of putting remote RSS feeds on my site. So I could have all
    my favorite news headlines in one place. There are services that do that but
    I want it to look the way I want it to look and besides I wold have other
    non related content on the same page swell. I want to know what is the
    method for putting other peoples RSS feeds on your site?

    1. When your php webpage is called download the XML files from the remote
    host parse them in php then spit out the results on the page

    2. download the XML files at regular intervals like on a timer or something
    so you have them on your hardrive. Then when your webpage is called open
    them up parse them, and spit out the results.

    3. download the XML files at regular intervals like on a timer or something
    parse them and put the data into a database then when your php page is
    called connecto to the database and spit out the results.

    4. none of the above

    How is this done?

    Thanks



  • Tim Van Wassenhove

    #2
    Re: RSS

    In article <c9d2to$5g5$1@k ermit.esat.net> , Danny wrote:[color=blue]
    > Hi
    > I was thinking of putting remote RSS feeds on my site. So I could have all
    > my favorite news headlines in one place. There are services that do that but
    > I want it to look the way I want it to look and besides I wold have other
    > non related content on the same page swell. I want to know what is the
    > method for putting other peoples RSS feeds on your site?[/color]

    I use http://magpierss.sourceforge.net
    [color=blue]
    > 1. When your php webpage is called download the XML files from the remote
    > host parse them in php then spit out the results on the page
    >
    > 2. download the XML files at regular intervals like on a timer or something
    > so you have them on your hardrive. Then when your webpage is called open
    > them up parse them, and spit out the results.
    >
    > 3. download the XML files at regular intervals like on a timer or something
    > parse them and put the data into a database then when your php page is
    > called connecto to the database and spit out the results.[/color]

    Ask yourself the following:
    - How many times is/are that/those page(s) requested?
    - How long does it take to fetch does feeds?

    Having these 2 questions in mind, i decided to have a script that
    fetches every 30 minutes all the feeds and stores them in my database.

    When i have a page that displays these feeds, i fetch the data from my
    database, wrap some html (or wml or whatever) around it and return it to
    the visitor.

    --
    Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>

    Comment

    • Danny

      #3
      Re: RSS

      >[color=blue]
      > I use http://magpierss.sourceforge.net
      >[color=green]
      > > 1. When your php webpage is called download the XML files from the[/color][/color]
      remote[color=blue][color=green]
      > > host parse them in php then spit out the results on the page
      > >
      > > 2. download the XML files at regular intervals like on a timer or[/color][/color]
      something[color=blue][color=green]
      > > so you have them on your hardrive. Then when your webpage is called[/color][/color]
      open[color=blue][color=green]
      > > them up parse them, and spit out the results.
      > >
      > > 3. download the XML files at regular intervals like on a timer or[/color][/color]
      something[color=blue][color=green]
      > > parse them and put the data into a database then when your php page is
      > > called connecto to the database and spit out the results.[/color]
      >
      > Ask yourself the following:
      > - How many times is/are that/those page(s) requested?
      > - How long does it take to fetch does feeds?
      >
      > Having these 2 questions in mind, i decided to have a script that
      > fetches every 30 minutes all the feeds and stores them in my database.
      >
      > When i have a page that displays these feeds, i fetch the data from my
      > database, wrap some html (or wml or whatever) around it and return it to
      > the visitor.[/color]


      Thanks Tim thats what I wanted to know






      Comment

      • FLEB

        #4
        Re: RSS

        Regarding this well-known quote, often attributed to Danny's famous "Sun,
        30 May 2004 17:43:21 +0100" speech:
        [color=blue]
        > Hi
        > I was thinking of putting remote RSS feeds on my site. So I could have all
        > my favorite news headlines in one place. There are services that do that but
        > I want it to look the way I want it to look and besides I wold have other
        > non related content on the same page swell. I want to know what is the
        > method for putting other peoples RSS feeds on your site?
        >
        > 1. When your php webpage is called download the XML files from the remote
        > host parse them in php then spit out the results on the page
        >
        > 2. download the XML files at regular intervals like on a timer or something
        > so you have them on your hardrive. Then when your webpage is called open
        > them up parse them, and spit out the results.
        >
        > 3. download the XML files at regular intervals like on a timer or something
        > parse them and put the data into a database then when your php page is
        > called connecto to the database and spit out the results.
        >
        > 4. none of the above
        >
        > How is this done?
        >
        > Thanks[/color]

        This *might* be what you meant by 3.), but...

        4.) There is a "cache" RSS file of the aggregated/processed XML files on
        your server. Your feed-reader hits the script, looking for a feed. If the
        cache is out of date, the script querys the individual sites,
        re-aggregates, re-processes, and builds a new cache file. If the cache is
        less than 30min old, the script just redirects to that file.

        This gives the benefits of the "update every 30 minutes", without actually
        needing to update if no one's using it. Also, I'd call a database overkill
        in this situation. If your output is an RSS (XML) file, and it's always an
        RSS file, just write out and redirect to a static RSS file, and spare the
        processing and DB calls.

        --
        -- Rudy Fleminger
        -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
        (put "Hey!" in the Subject line for priority processing!)
        -- http://www.pixelsaredead.com

        Comment

        Working...