943,878 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1436
  • PHP RSS
May 12th, 2009
0

Combine Two RSS Feeds Using DOM or SimpleXML

Expand Post »
I am trying to merge two different RSS sources with the same structure into a single list concurrently. I have two foreach statements but would like to combine them. Problem I can not turn a DOM Method into an array... Thanks in Advance.

###### CODE BELOW Using DOM METHOD #####
PHP Syntax (Toggle Plain Text)
  1. <?php
  2. foreach($rssResults1 as $value){
  3. echo('<div><a href="' . $value->childNodes->item($thing1)-> nodeValue . '">'); //Url
  4. echo($value->childNodes->item($thing2)->nodeValue . '</a></div>'); //Title
  5. }
  6.  
  7. foreach($rssResults2 as $value){
  8. echo('<div><a href="' . $value->childNodes->item($thing11)->nodeValue . '">'); //Url
  9. echo($value->childNodes->item($thing22)->nodeValue . '</a></div>'); //Title
  10. }
  11. ?>
Similar Threads
Reputation Points: 20
Solved Threads: 0
Light Poster
lonestar23 is offline Offline
43 posts
since Mar 2008
May 24th, 2009
0

Re: Combine Two RSS Feeds Using DOM or SimpleXML

Why not use a ready-made script like RSSmesh to merge the feeds? It seems it would be much easier.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MayaLocke is offline Offline
5 posts
since Mar 2009
May 26th, 2009
0

Re: Combine Two RSS Feeds Using DOM or SimpleXML

Talk you all for the help with combining two RSS feeds. I found that BuildaSearch has a an API which can combine two data sources into one.

Cheers!
Reputation Points: 20
Solved Threads: 0
Light Poster
lonestar23 is offline Offline
43 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: email confirmation
Next Thread in PHP Forum Timeline: bbcode help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC