By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,062 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,062 IT Pros & Developers. It's quick & easy.

RSS

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <c9**********@kermit.esat.net>, Danny wrote:
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?
I use http://magpierss.sourceforge.net
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.


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>
Jul 17 '05 #2

P: n/a
>
I use http://magpierss.sourceforge.net
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.


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.

Thanks Tim thats what I wanted to know


Jul 17 '05 #3

P: n/a
Regarding this well-known quote, often attributed to Danny's famous "Sun,
30 May 2004 17:43:21 +0100" speech:
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


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.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.