Combine Two RSS Feeds Using DOM or SimpleXML

Reply

Join Date: Mar 2008
Posts: 36
Reputation: lonestar23 is an unknown quantity at this point 
Solved Threads: 0
lonestar23 lonestar23 is offline Offline
Light Poster

Combine Two RSS Feeds Using DOM or SimpleXML

 
0
  #1
May 12th, 2009
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 #####
  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. ?>
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: MayaLocke is an unknown quantity at this point 
Solved Threads: 0
MayaLocke MayaLocke is offline Offline
Newbie Poster

Re: Combine Two RSS Feeds Using DOM or SimpleXML

 
0
  #2
May 24th, 2009
Why not use a ready-made script like RSSmesh to merge the feeds? It seems it would be much easier.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 36
Reputation: lonestar23 is an unknown quantity at this point 
Solved Threads: 0
lonestar23 lonestar23 is offline Offline
Light Poster

Re: Combine Two RSS Feeds Using DOM or SimpleXML

 
0
  #3
May 26th, 2009
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!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC