Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > MacNN RSS/XML Feed

MacNN RSS/XML Feed
Thread Tools
mrl14
Junior Member
Join Date: Nov 1999
Status: Offline
Reply With Quote
Mar 25, 2003, 09:02 PM
 
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!
Get FREE software, legally

http://www.trybeta.com
     
tintub
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status: Offline
Reply With Quote
Mar 25, 2003, 09:44 PM
 
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);
     
tintub
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status: Offline
Reply With Quote
Mar 25, 2003, 09:57 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:03 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,