Creating RSS feeds for sites without them (or fan site dev t

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wyrd33
Forum Newbie
Posts: 1
Joined: Sat Feb 04, 2006 11:29 pm

Creating RSS feeds for sites without them (or fan site dev t

Post by wyrd33 »

I've noticed a new trend in fan sites these days; dev trackers. They scan the official forums of a fan site, and save posts from developers in a database. Some sites even provide RSS feeds for other fan sites to leech off of. Here's an example; http://www.silkyvenom.com/?page=devtracker

Recently I've come across an RSS "bootleg" which is also providing RSS feeds for certain sites that don't provide RSS feeds. These feeds display the latest news for that site. Here's an example of someone doing that; http://bootleg-rss.g-blog.net/

Now to my questions;

- What would be the best way to do this using PHP and MySQL?
- How can I update these feeds every, say, 1 hour? The "duh" answer would be to just have the script check the last update time when someone hits your web site. However, say I make 100 feeds. I can't be checking all of those feeds when that one user refreshes the web browser on my site. I need a silent way to do this. Is there a way to run a PHP script in the "background" on my web server? That runs on it's own? Or is there another way to go about doing this?

Thanks for your time.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

You can write command line PHP scripts that are executed on regular intervals by a unix CRON job. If you wanna take it to the next level you can track how often the pages at that site are updated and spider that site at appropriate intervals. Also check out the http spec for 304 Not Modified

You can ask the webserver to only send you the page if that page has been updated, this way you're not killing the webmaster's bandwidth
Post Reply