I've been working with the iTunes search API to get the content from iTunes to display on my site which returns JSON data that I'm storing in the database and then displaying the data from my database. I'll be using linkshare to affiliate my links of the product to the iTunes Store. The problem I'm facing is when I save my data to the database I'm saving the iTunes URL of the product in the database (which isn't affiliated) and I'm wondering if there is away that I can integrate the linkshare affiliate link to my search API so I don't have to manually setup the affiliate link for each product every time. Thanks in advance, I appreciate the advice!
iTunes Search API URL
http://itunes.apple.com/search?term='.$term.'&limit=5&media=software&enity=software
URL RETURNED
https://itunes.apple.com/us/app/angry-birds-seasons/id398157641?mt=8&ign-mpt=uo%3D4%2522
AFFILIATE URL REQUIRED
http://click.linksynergy.com/fs-bin/stat?id=yfbyIWqHFt8&offerid=146261&type=3&subid=0&tmpid=1826&RD_PARM1=https%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fangry-birds-seasons%252Fid398157641%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30