Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/143570-optimal-method-for-parsing-rss/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.