How To Add Affiliate Products From LinkShare

by derek on January 22, 2009 · 79 comments

In this next step of our case study on getting started with affiliate marketing, we will examine how to automate the process of adding affiliate products from LinkShare to our site.

Merchandiser Data Feed Program

LinkShare offers a service that they refer to as the Merchandiser Data Feed Program that allows publishers to maintain a database of product links that is updated daily. Unfortunately, there is a one-time setup fee of $250 unless specific criteria has been satisfied.
Since we are hoping to get started with as little upfront cost as possible, this is probably not our best option and is one that I have not personally explored. However, there is another option for those of us that do not meet the criteria to avoid the setup fee.

Merchandiser Query Tool API

Before you get scared by the mention of API, let me tell you that this is extremely easy to implement and does not require extensive technical knowledge when you use the process that I am about to share with you.
The Merchandiser Query Tool API is a Web service that allows you to run a query against any one, or all, of the merchants that you have a partnership with at LinkShare and will return a listing of affiliate products. The query can return a maximum of 4,020 search results, which should be more than sufficient for our needs.
So how do we leverage this service?
In order to efficiently use this service, we are going to create a custom script (fancy word for PHP page) that we can use throughout our site to display relevant affiliate products.
There are a few prerequisites that must be met in order to use this script: 1) we have an account at LinkShare.com and have been approved for at least one merchant; 2) we have requested and received our web services token from LinkShare.

Creating Custom LinkShare Script

Now that we have satisfied the prerequisites, we are ready to create our script. Don’t worry, it really isn’t as bad as it sounds. To get our script working on our site, we need to perform the following steps.

  • Save the code from Code Example #1 to a file named linkshare.php
  • Open the file in a text editor and insert our LinkShare token on Line 4
  • Upload the file to our web host

Now, wasn’t that easy?
At this point, we have a functioning custom script on our site that will return affiliate products from our merchants at LinkShare. To test that our script is working, simply open a new browser or tab and navigate to the following URL:

http://yourdomainname.com/linkshare.php?keyword=yourkeyword

Be sure to actually update the link to include the appropriate domain name and a relevant keyword for at least one merchant. If everything is setup properly, we should see a display of products from at least one of our merchants.
There is the possibility that we will see a message that there aren’t any available products. That doesn’t mean that the script is not working, as we may simply need to change the keyword to match the products of our approved merchants.
Also, this script assumes that our web host supports PHP5 as the call to simplexml_load_file will not work if your host is running PHP4. If you encounter this problem, let me know and I can share the code to work around that issue.
One last note about the code example, you will note that there is a URL on Line 2 that has been commented out. For whatever reason, I found the standard LinkShare link to be extremely unreliable and often resulted in a script failure. By changing to the URL on Line 3, I have not had any problems but feel free to experiment with either URL.
Code Example #1

linkurl;
        $title = $item->productname;
        $imgURL = $item->imageurl;
        $price = $item->price;
        $merchantname = $item->merchantname;
        $description = $item->description->short;
        if($link != "")
	        $results .="
".$description."
Add to Cart: $price
"; } } if ($results == '') { $results = "
There are no available products at this time.
"; } print $results; ?>

Now that we have our custom script installed on the server and everything is working great, we need to investigate how we can actually implement this script on our site.

Implementing Custom LinkShare Script

Ideally, we will want to incorporate one or more affiliate products within the content of a blog post. As an example of what we want to accomplish, look at how the affiliate products are integrated in this post about buying the right football gloves.
In order to implement the script in the manner described here, our site will need to satisfy the following prerequisites: 1) Exec-PHP plugin must be installed, as we will be executing PHP code within a blog post 2) our web host must support cURL (if not, there is a workaround).
Next, we simply need to copy the code from Code Example #2 into our blog post and update the URL parameters as necessary. There are four parameters that we can specify:

  • keyword :: Replace KEYWORD with the keyword that you would like to use for your product search
  • cat :: Replace CATEGORY with a product category to restrict the search results
  • max :: Replace MAX with the maximum number of products to return in the search results
  • mid :: Replace MERCHANT with the merchant id of an advertiser to limit the search results to their products only

Of the four parameters above, only the keyword is required. The remaining parameters are optional, although they will assist in refining our search results so the products match the content of our post as closely as possible.
Note: If you choose not to use one of the optional parameters, remove the entire parameter (i.e. remove “&mid=MERCHANT” not just “MERCHANT” if you choose not to specify a merchant).
To receive the best quality search results, it may be necessary to experiment with a variety of parameter settings.
Code Example #2


At this point we should have our custom script installed on the server and have a new blog post that is returning relevant affiliate products within the content of the post.

Wrapping It Up

The process above is exactly what I have done to integrate affiliate products on both Pro Football Workouts and Chicago Football Gifts. Keep in mind that the code provided above does not include any true error handling, but it has been working well on my sites.
Also, as mentioned earlier, you may encounter problems depending on certain configurations made by your web host. The two most likely issues will be support of PHP5 and/or cURL. If you encounter problems with either of these, let me know and I can offer assistance.
Is this a perfect process?
Not by any means, as there is still a good deal of manual work involved and the code could certainly be improved upon (adding robust paging controls, error handling, etc.). This should get you started though and allow you to start adding affiliate products from LinkShare.
Now go earn some money!

Stay In The Loop!

Subscribe to the Derek Semmler dot com feed via RSS or Email to receive notifications when new posts are published. Follow the WordPress ninja on Twitter too!

{ 77 comments… read them below or add one }

John@ Home Furniture January 23, 2009 at 1:01 am

At the start of the post, I must admit that this could be very technical and I may not be able to do it on my own. But your explanations really cleared up some things for me. Maybe, when I find the time, I might put this into action.

Reply

derek January 24, 2009 at 11:43 am

John, it really isn’t too bad but I understand that the technical aspect might make a lot of people shy away. If you have questions, be sure to let me know.

Reply

Writers For Jobs- Make $200-$300 Daily February 25, 2009 at 12:33 pm

I really cannot stand Linkshare to be quite honest with you. But you did write a pretty good comprehensive DIY guide for adding products. I wish Linkshare had a more easier interface to navigate.

Reply

Kelvin Kao January 23, 2009 at 1:44 am

Good to see a detailed example like this. Most websites I’ve seen just say you should do this and this but never elaborates on how, but you do. Now, I’m not going to be doing anything with affiliate products any time soon, so I don’t really give a damn in that aspect, but it’s fun for me to read about this kind of stuff because I like to know how things work… that and I’m a programmer.
I wonder if that’s a static address though. What if their IP changes?
For anyone with any php knowledge, this is pretty sraight-forward code to read. For people not familiar with php, it’s still simple in that they can just plug in the token and go.
Nice post!
Kelvin Kaos last blog post..WordGirl: My New Favorite PBS Show

Reply

derek January 24, 2009 at 11:47 am

Thanks Kelvin! This post was actually a lot of fun to write as I love digging into the technical things and trying to explain that in a way that will help other people.
I was trying to decide how much detail to give about the entire code block and hope that I provided enough without losing people.
Re: the IP, I haven’t had any issues with it and have been using it for quite some time. That also means that I haven’t reverted back and tried their domain name either. This has been one of those “if it ain’t broke, don’t fix it” thinks for me.

Reply

trendy January 23, 2009 at 6:02 am

that was great examples really .. i visited several sited , blogs but nobody have time to explain the things, they usually put a short code for any task and they dont worry that it is understandable by others or not..
but you really did a great job…

Reply

derek January 24, 2009 at 11:48 am

Glad to hear that you liked it and hopefully you will find it useful. Thanks for stopping by!

Reply

Ling@Uptake January 23, 2009 at 8:17 am

My eyes started glazing over halfway through, so you’ll have to forgive me for that. One question, though. This script is limited to this particular network, I assume. So what about the others (if there are others)? Isn’t tthere some kind of script which can pull in data from all the major aff. networks?

Reply

derek January 24, 2009 at 11:50 am

Ling, you’re right in that this is only for LinkShare. I’ve got a separate script for Share-a-Sale as the process is different for me. There is no question that these could be combined into one script, which is what many of the tools have done for you.
The problem with making one script of your own is that each network, as well as each feed, is different enough that it can quickly become unmanageable.

Reply

Nicole Price January 23, 2009 at 8:36 am

It is all over my head Derek. I doubt that I can do what you expect me to do in your last paragraph. I like your style though!

Reply

derek January 24, 2009 at 11:51 am

It never hurts to try. 🙂

Reply

Nick@romandock dot com January 23, 2009 at 8:47 pm

Sweet! I’ve already copied the code so I can use it, but now I have to figure out if I already have a LinkShare account or if I still need to create one. Oh, and I already copied your code so even if you take it down, it’s too late 🙂
Nicks last blog post..Make PDF Files With PDFCreator

Reply

derek January 24, 2009 at 11:52 am

Lol, you can be pretty certain that this code will be here as long as this blog exists. 😉
Let me know if you have any questions, as well as if you are able to make any use out of this code.

Reply

Gabe January 24, 2009 at 4:05 pm

It is really the technical side of it, as you are saying derek, that scares people off! The information is nice, but I am having difficulties to understand the codes!

Reply

Neil@PS3 January 24, 2009 at 4:46 pm

I tried to use Linkshare on one of my previous ventures and couldn’t really make it pay. I have been building my traffic to my current blog and have been getting plenty of click throughs to amazon so hopefully will get some conversions and make some money. Then I might have a look into some other advertisers.
As I already have a linkshare account then I will probably use them so these tips will come in very handy when i get around to it.
Currently busy writing articles for my blog and redesigning one of my sites from scratch. New Design, New Content, New Host, Everything

Reply

45 Second News January 25, 2009 at 5:29 pm

Man this looks hard. Its gonna take quite a while to figure this out.
45 Second Newss last blog post..Israeli’s Accused Of War Crimes

Reply

Limoeg January 26, 2009 at 3:23 am

Thanks for the instructions.

Reply

Best Man@Best Man Speeches January 28, 2009 at 10:24 pm

That’s a good technical article. However I wasn’t not very comfortable doing this on my own. In fact adding the right affiliate product on your page from LinkShare could be tricky. Thanks for your insight.

Reply

Women's Dress Shirts January 29, 2009 at 10:32 pm

Nice post, I was looking for something like this and you’re explanation of how to do it was great. Thanks again!

Reply

amrita@Web Site Design Dubai January 30, 2009 at 5:45 am

thanks for such nice article this is really helpfull for my blog
thanks

Reply

David February 2, 2009 at 1:30 pm

I’m pretty new to affiliate marketing. I’ve been using Amazon, which I like because they have such a wide array of products that they can always match something to your content. I will check out this Linkshare thing though as I think it will enable me to get more targeted products on my sites.
BTW. I developed a object oriented wrapper for cURL in PHP that may be of use to you. It just makes your code neater and easier to manage. I tend to build a generic getURL( $url, $additional_opts ) for my scripts, so I just need to call a function to get a url. You can find the class here with some instructions.
Davids last blog post..Enableing Chinese, Arabic and Other High Unicode in WordPress Slugs

Reply

Internet Strategist February 4, 2009 at 12:43 am

Does anyone have any comments on the difference between LinkShare and ShareASale. I’m especially interested in why a merchant would use both or why those promoting affiliate programs would prefer one over the other. Do you all use both? Would you stop promoting a store that eliminated one of them? Which do you prefer? Thanks for any input.
Internet Strategists last blog post..Have a Blog? You Win By Reading This Blog Review Contest Entry on Best Blog Design!

Reply

Melaleuca Frank VanderSloot February 4, 2009 at 11:06 pm

One must know HTML or coding for doing such thing. I can’t do that.

Reply

Justin@Airsoft Guns February 9, 2009 at 5:39 am

That seems kind of complicated to me, but if I really wanted to, I’m sure I could figure it out. I’d rather just stick with Amazon than messing with all that code, though, although I have to admit I have derived pleasure from coding in the past.

Reply

Thomas February 12, 2009 at 11:16 pm

Thanks for the code, works great!
Thomass last blog post..Meditation classes for kids in schools

Reply

lisa February 23, 2009 at 12:52 am

wow..thanks for sharing the codes. very informative article. keep on posting.. I need that in my website… 🙂

Reply

Ajith Edassery | Blog Money February 23, 2009 at 4:31 am

I need to really start caching via affiliate links. So far private ad sales, adsense and once in a while referral income are the only monetization means.
Does anyone know about a good Amazon affiliate plugin?
Ajith Edassery | Blog Moneys last blog post..Google Monitor: Track your search engine ranking for FREE

Reply

Terry Walker February 27, 2009 at 7:29 am

Wow, I never knew that How To Add Affiliate Products From LinkShare. That’s pretty interesting…

Reply

Prashant June 3, 2009 at 12:30 am

I have downloaded the product datafeed XML file from my Linkshare FTP account. In this file there are limited imformation, how can i get all the information ?

Reply

Sanavas March 19, 2009 at 4:12 am

I have used linkshare earlier but I find it very difficult to make sales and dropeed it
Sanavass last blog post..Create a Blog at a Mouse Click

Reply

Karen June 8, 2009 at 9:22 pm

Thank you for this tutorial, I learned a lot!
I’d like to take the script a bit farther and develop an application that will pull products via web services.
I’m not using WordPress and I really don’t want to implement RSS for my site on a mass scale. I really need one that will allow me to compile my own data feeds since they won’t provide any unless you’re a performer or have money to invest.
Can you point me in the right direction?
~Karen

Reply

Tony June 28, 2009 at 1:39 am

Nice to see a tutorial like this on the Linkshare system, I’d love to point you at a resource that I’ve developed which is a free plugin for wordpress to show Linkshare merchandiser products within your blog.
its available here.
Linkshare Merchandiser Plugin
I hope it will be useful.
.-= Tony´s last blog ..Meat and Cheese T-Shirts =-.

Reply

j henry August 11, 2009 at 8:00 pm

Great post! Keep up the good work!
.-= j henry´s last blog ..If you want to be one… =-.

Reply

Guillo October 11, 2009 at 1:25 am

hey friend!
thank you for sharing your experience with us! i am very grateful.
Ont thing though… I uploaded the code in .php but when i tried it the page gave me a 401 not found error.
then i uploaded it in .htm / .html and gave me a no resilts found error with a partial code on the screen.
u can check out yourself with the test link. my domain is savingsonthefly.com
your help will be greatly appreciated!

Reply

Jon February 26, 2010 at 2:37 pm

Thank you so much, this was tremendously helpful.

Reply

Robyn March 9, 2010 at 11:33 am

Hi
thanks for this easy to understand guide. You can make use of the merchandiser for free if you’ve been a member for 3 months and have made 50 sales in the previous month – don’t quote me on the exact criteria and maybe its different for UK residents. Anywho, are you able t provide an explanation on how to use the merchandiser. I’ve downloaded the folders from the linkshare server but I don’t have a clue where to put them, what to do with them etc…
thanks for your time!

Reply

Nick April 15, 2010 at 8:39 pm

This code works great for the results I was looking for. Just one question, I have been searching all over and I am new to PHP and have some knowledge in HTML and I am looking for a way to format the results into 2 or 3 columns across instead of just the list, but I have not been able to figure out using tables with the results. Is this possible? Thanks so much for this information as it has been very helpful!

Reply

ArtMan June 12, 2010 at 12:38 am

Hi,
fantastic post and very useful. I’m tryin a couple of plugins and codes on my site. I’m looking to add the paginator, similar to what you have on your chicago footbal page. Would you mind sharing the code or instructions.
Thank you much.

Reply

derek June 13, 2010 at 11:07 am

This would probably make the most sense as a separate post to fully explain the pagination.
In a nutshell, in the Code Example #2 above I’ve added two additional parameters to the link for the current page number and the results per page. In the Code Example #1, I read in the values of these parameters and if not yet set I assign default values. In the loop of the results, I then offset the array of results according to the page number I am on and build the pagination links at the end of the loop.
I know that probably doesn’t make a ton of sense, so that is why I will provide the code and explanation in the form of a post.

Reply

ArtMan June 14, 2010 at 9:21 am

Thanks for the info. I very much look forward to your post with the code. I know a thing or two about PHP but not savy; an example code is of great help. Also the XML response does include the number of pages – is there a way to use that also as the final value?
Thanks

Reply

derek June 16, 2010 at 1:08 am

Stop on by later this morning for the pagination code. As a note, you’ll find that the main section of code was changed from the original example but I have provided the full page of code.
Hope you find it helpful.

Reply

ArtMan June 16, 2010 at 3:02 pm

Hi,
i can’t find it – I’ll check-in again later.
Thanks in advanced for all your help.

derek June 16, 2010 at 3:14 pm

Sorry, you can find the new post right here.

big24fan June 25, 2010 at 9:17 pm

I hope this thread isnt dead yet. I have configured the Code Example 1 on my website and it works fine, however, I want to format the search results as a table 3 columns wide. I dont really mind if all results are on one page, but I do need the table results. Can someone help me out?

Reply

Rachel@ merchant processing October 18, 2010 at 10:43 pm

I do agree that there is manual work to be done here. But it is worth it if you are able to start the affiliate products. I’m sorry I can’t help you big24fan. I would like to see that.

Reply

Sheila January 12, 2011 at 7:30 pm

I am a novice. I can’t figure out how to paste a picture banner at all.
I did do some text pastes, but it was months ago and I remember having to be sure to copy only certain things or it wouldn’t work. Now, I am forgetting how to do even that.
Can you help me with the picture banners?

Reply

derek January 12, 2011 at 9:08 pm

What exactly are you trying to do with banners? I’m not sure I follow so if you could provide additional information that would be helpful…

Reply

usman January 17, 2011 at 12:11 pm

Hello Buddies,
I was trying to work further on your great code, but it seems like “cat” parameter to get categories feed is not working, for example i put “Electronics” for cat and put “computer” as keyword but no results, i used the same spellings as in linkshare dashboard, also try it with cat_ID but nothing worked, any suggestion on this.
Thanks n take care

Reply

derek January 17, 2011 at 9:54 pm

Are you limiting your query to a particular merchant? Did you change the MID from my example to an accurate merchant?
If you’d like, shoot me the query you are using via email and I will give it a go to see if I can determine why it isn’t working as expected.

Reply

usman January 18, 2011 at 6:38 am

THank you very much derek for your reply . And it is strange, it works now. i think there was some issue at linkshare side. i didnt use the MID , i just use the cat, keyword and my token, I will ask for your help again :).
Thanks again!

Reply

derek January 18, 2011 at 11:04 pm

Happy to hear it is working for you now! I appreciate you following up and letting me know.

Reply

Buy a New Computer January 25, 2011 at 5:18 am

Thanks man ! I am searching many hours to find a way to implement to automate the coupons from linkshare. Great!

Reply

James K February 5, 2011 at 8:42 am

Derek,
I am pretty familiar with API’s. I use CJ, Amazon, Yahoo etc regularly. But with link share no matter what I do to the query I always get a “Problem Loading Page” error unless I change the token and then I get an xml result that says invalid token.
Any Suggestions?

Reply

derek February 6, 2011 at 2:24 pm

James, have you checked the URL you are using for their service? Take a look up in Code Example #1 and you will see that I had to change the URL that I was using to the IP address of their server as I was getting extremely inconsistent results when using the fully qualified name.
Beyond that, I would probably try using the token that gives you the “Problem Loading Page” error but strip it down to a really basic query. I don’t know what else you were adding to the query but I would try something as basic as using your token and a single keyword, or just a single merchant id, to see if you can get results. It could be a problem with your query, but this first step will confirm your token works properly.

Reply

Chris McGrath February 23, 2011 at 1:20 pm

Hey Derek,
We have been having a heck of a time with this REST call to Linkshare your post is great but still does not work for us simply telling us there is no data at this time. We have tested our query in the Google REST Client and it is operable. We could not test that in your code as we are novices and need a cut and paste solution. We did run your code as products would not be too bad but what we wanted to start with is coupons. Our REST client call returns 800 results via XML but we cannot find the code to impliment this correctly. Could you help us out with getting this to work with products and coupons? We could try to do it with cut and paste examples or just hire you for a couple of hours? Thanks

Reply

Gregory May 26, 2011 at 2:46 am

The only problem I see with this approach of integrating affiliate products is duplicate content for seo purpose, many other websites as well will publish same content.
I prefer to incorporate affiliate products manually and alter product description text to make it unique.

Reply

derek June 6, 2011 at 9:52 am

Gregory, that is a very valid point and one that does need consideration. One option that I have used in the past is to pull the product feeds into my own database or as individual posts and then go back and edit the content to be unique. If you’re only doing a product here and there, it will probably be easier to do manually as you mention.

Reply

Kostas@Online Opportunities July 18, 2011 at 10:30 am

Duplicate content is really something you have to consider if you use this technic but as you said you can spin the content and avoid that kind of problems.

Reply

ted benson June 15, 2011 at 9:29 am

Hey, it’s awesome that I can just copy and paste it…great job!

Reply

phpdev August 1, 2011 at 4:41 am

Hi,
I am getting following error:
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity “ftp%3A
I have followed your above instructions but unable to resolve it. Can u Help me.
Thanks in advance

Reply

derek August 1, 2011 at 10:36 pm

Does your host support simplexml? What version of PHP is your host running? Also, what host are you using? I’ve read numerous posts about people with HostGator needing to have php.ini setup differently for their sites in order for the simplexml to work.

Reply

klaus@iphone 4s pris October 24, 2011 at 2:55 am

thanks for this.
very usefuld for a newbie ind this bussines like me..

Reply

Kat@ Ways To Work At Home November 9, 2011 at 9:24 am

Yikes ! The title of this post piqued my interest as I seek a better way to create an online store, but wow, it went over my head. I am currently using a third party tool, but it is limiting.
APIs intimidate me. That being said, your instructions seem complete, so I’ll re-read, and re-re-read them.

Reply

derek November 9, 2011 at 3:13 pm

Which third party tool are you using? I’ve been using Datafeedr for quite some time and am really pleased with it. There are a few mentions of it here on the blog if you’re interested in reading more about it.

Reply

Kat@ Ways To Work At Home November 11, 2011 at 9:16 am

Derek: A while back I briefly looked into Datafeedr, but decided to stick with Popshops. I want more flexibility without paying a price. Thanks for reminding me of Datafeedr – I’ll peruse your blod for more info. Sheese…I wish I was more knowledgeable in this area.

Reply

Settlement Purchaser November 9, 2011 at 10:44 am

Wow this isn’t what I had expected I had some trouble with this a few weeks ago and I only wish this had been published then. It took forever to trouble shoot my problems.

Reply

Jack@Wall Heaters December 30, 2011 at 3:36 am

Linkshare seems pretty darn cool. I’d just stuck to a limited amount of networks till recently. I’ll explore and play around with it! Thanks.

Reply

Vijay January 5, 2012 at 9:59 am

Hi, Thanks for sharing this. It was exactly what I was looking for. If anyone is having problems getting the above code to work, you may need to change the linkshare URL on line 4 to:
$url = “http://productsearch.linksynergy.com/productsearch”;

Reply

derek January 5, 2012 at 4:08 pm

Thanks for the update. I know at the time this was written the various links were painfully inconsistent in their reliability.

Reply

steve January 12, 2012 at 8:53 pm

I have tried this and had no such luck, but I am new. I would like to have this option on one of my pages. Can anyone assist me in getting this done?

Reply

Deelfinders February 29, 2012 at 10:04 pm

Hi Derek,
I got the code exmple 1 to work took me a bit but finally works…
now as for code example 2 i installed the wp php exec plugin and activated it. But when i plug in the curl code it just posts as if i put it in my blog as text. here is the url http://skincare.deelfinders.com/skin-care-anti-aging/perricone-md-neuropeptide-facial-conformer-2-ounce-tube/ please let me know if i need to do the curl work around or perhaps the plugin is not working right.
thanks for your post it Will defiantly help me!

Reply

Deelfinders February 29, 2012 at 11:09 pm

How can we take advantage of the following info for automated link generation ….
http://cli.linksynergy.com/cli/publisher/links/webServices.php?serviceID=43
im really needing to get this to work so i can create all the nitch sites i have planned.

Reply

derek March 1, 2012 at 11:12 am

It looks like you may have fixed this, or removed the code, as I am not seeing it displayed on the page.

Reply

Deelfinders March 1, 2012 at 11:28 am

well i removed it got impatient… the code you see there is a coupon plug in which is nice but not what im looking for.. i want image content as well… i reposted the script you can see it now any help would be awesome sir!

Reply

derek March 1, 2012 at 11:30 am

It looks like the opening line of the code sample is missing. The < ?php line. Without that the code will not work as it doesn't recognize that you're starting a PHP code block.

Reply

1ez1 Global LLC October 22, 2012 at 3:48 pm

Hi Derek,
Hello:
I’m trying to follow your instructions for
implementing the linkshare merchandiser program
.
I tried switching the URLs on line 2 & 3 of the example 1 PHP script and uploaded that modified script to my website folder file. I ran a test to see if it was going to work using the following URL:
“Http://shoeset.net/linkshare.php?keyword=Steering”.
The script returns the following error messages:
“Warning: simplexml_load_file(h detect ttp://65.245.193.50/productsearch?token=45c4209ce0b3f56a4041d6ca3a37c0bf88cb8fc9fec2b92be46e78b340ad19ca&keyword=Steering) [function.simplexml-load-file]: failed to open stream: Connection timed out in /home/i12helpu/public_html/shoeset.net/linkshare.php on line 34
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity “http%3A%2F%2F65.245.193.50%2Fproductsearch%3Ftoken%3D45c4209ce0b3f56a4041d6ca3a37c0bf88cb8fc9fec2b92be46e78b340ad19ca%26keyword%3DSteering” in /home/i12helpu/public_html/shoeset.net/linkshare.php on line 34
There are no available products at this time.”
Is there another URL that I should be calling to in my PHP script?.
What did I forget to do?

Reply

1ez1 Global LLC October 22, 2012 at 4:23 pm

Update: after reading through all of the comments left by other users I was able to find a solution and all is working well now.
I guess at some point after you published this post, Linkshare updated the URL address to one that is different then the one you used in the “Code Example #1″
php script. ”
Below, I have copied and pasted an earlier comment from another user that did solve the problem.
Vijay wrote: January 5, 2012 at 9:59 am
“Hi, Thanks for sharing this. It was exactly what I was looking for. If anyone is having problems getting the above code to work, you may need to change the linkshare URL on line 4 to:”
$url = “http://productsearch.linksynergy.com/productsearch”;

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: