eyev Posted February 3, 2009 Share Posted February 3, 2009 Hello gurus , I'm at a loss on how to parse a php feed that is dynamic.. Right now, I want to search the feed for specific node values, and return the results on wether it finds it or not... To be specific, I want to parse www.ustream.tv/live.rss and display wether select users show up on the rss feed (If their stream is online or not). I am not sure if i should be heading towards Regex or a simple DOM script, every DOM script i've tried to use struggles to search for multiple values, they want to stop once they find 1st or just don't return any results..... So my operation of method would be: -user goes to mypage.php- -mypage.php grabs live.rss- -mypage.php prints all streams currently live- -user see's which streams are live(which usernames showed up in the feed)- ustream has an API but it only supports up to 10 parallel requests, limiting functionality twofold, I had minor success working with it, but its lack to support more than 10 users per request made it not so great for my use... ANY help appreciated, even the simplest point in the right direction, if you know of something like this that's already being done, feel free to point me in that direction.. I've read a lot of RSS / Regex forum posts and have yet to find a similar/identical situation... Thanks, eyev Quote Link to comment https://forums.phpfreaks.com/topic/143570-optimal-method-for-parsing-rss/ Share on other sites More sharing options...
JonnoTheDev Posted February 3, 2009 Share Posted February 3, 2009 Parsing RSS in real time to be displayed on another site isnt always the best method because if the remote server is slow it slows your site down, also if the remote server is dead you end up with errors on your end. If possible use a cron to grab the RSS data and store it in a db table. Then select rows from the table. Use something like http://www.phpclasses.org/browse/package/3598.html to convert the XML into an array making it easier to search and sort the results. Quote Link to comment https://forums.phpfreaks.com/topic/143570-optimal-method-for-parsing-rss/#findComment-753555 Share on other sites More sharing options...
eyev Posted February 5, 2009 Author Share Posted February 5, 2009 thanks a lot neil, right now I have figured out how to take the rss feed and spit all the titles into an SQL database Now, for the rest of the script (to filter the results of specific streams)... Quote Link to comment https://forums.phpfreaks.com/topic/143570-optimal-method-for-parsing-rss/#findComment-754997 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.