|
Take into consideration that the XML feed is being controlled remotely and you pretty much only have to work with what they give you. That being said, you need to get the exact feed you want ahead of time (some sites let you provide feed parameters to filter out stuff you don't want or to order your feed a certain way before the data even gets to your server) or else you'll need to create a PHP script to pull the RSS feed, loop through it and insert it into a temporary database table, then use SQL to query your newly inserted data against some desired parameters and spit out exactly what you want shown. I wouldn't recommend the latter if you have a high-traffic site as you could generate some pretty significant cpu load. You could setup a cron job to pull the feed once every few minutes, or at longer intervals if the feed isn't updated very often and then only insert when you need to. You could also create a permanent table in your database called something like "cached_rss" and then check the realtime rss feed against your "cached" database-stored feed data and if there's a new feed entry, REPLACE, else just select what you have.
The idea here is that once the data is in mysql, you can pretty much do whatever you want with it.
--S--
|