|
|
MacNN RSS/XML Feed
|
|
|
|
Junior Member
Join Date: Nov 1999
Status:
Offline
|
|
Hey,
I have a question regarding the RSS feed for Macnn ( http://macnn.com/macnn.xml)
I recently set one up on my site, however I noticed that the cron job that gets called every 15 min to run the script to update my xml feed, takes up 21% of my CPU power.
So I'm looking for some alternative.
Question is, is MacNN using a custom solution or is there some free php script that can update an RSS feed with dynamic info from a mysql db.
Thanks!
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status:
Offline
|
|
unless you get a huge number of hits, why not just get the .xml file and process it on the fly whenever it get's hit. Or, have a bit of php that says
Code:
if (getLocalXMLLastModified() > 15 mins old) {
$xml = getNewXMLFile();
// this would be in getNewXMLFile()
saveFileForFutureUse($xml);
} else {
$xml = getLocalXMLFile();
}
formatAndDisplay($xml);
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status:
Offline
|
|
oh sorry I thought you wanted to use MacNN's feed on your own site.
Why not just update your feed whenever a new item is published, or have the XML generated on the fly in the same way as I was saying before. I don't see why you have to have a cron job doing it. It should be a very quick operation to get the data out of the SQL database and convert it into an xml feed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|