Jump to content

Merge two xml feed results into one


tganny

Recommended Posts

Hi,

 

I'm trying to display products from two xml feeds, but i'm having a problem with the number of returned results.

The variable $max will return a given number of products.

For example, if i want to list 5 products then it will show 10 (5 from the first and another 5 from the second feed).

My question would be how to mashup these two variables/feeds, so when i request 5 products to display those 5 and not double it.

 

Here is the two feeds :

 

$url = "http://feed.linksynergy.com/productsearch?&keyword=$keywords&MaxResults=$max";

$url = "http://pf.tradedoubler.com/pf/pf?&keyword=$keywords&maxResults=$max";

and i'm parsing them in:

$result .='<div><a href=\"$producturl\">$producttitle</a><br />$productprice</div>';

 

 

Link to comment
https://forums.phpfreaks.com/topic/183054-merge-two-xml-feed-results-into-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.