Money-Code

Coding For Online Success

October 15, 2007
by admin
0 comments

CJ web service issues – unable to access WSDL (UPDATE)

Okay, thanks to ‘rickybobby’ that contacted me through the site. Looks like it’s a something sooo simple, I can’t believe I didn’t even try it. They dropped port 80 access and are restricting connection to port 443 only.


$soapclient = new soapclient("https://api.cj.com/wsdl/productSearchService.wsdl", 'wsdl');

Changing soapclient instantiation to this will work now. Thanks rickybobby!!!! I’ve updated the following post to show this change (“Simple script for connecting to Commission Junction’s Product Web Service and populating a local database“) Continue reading

October 12, 2007
by admin
0 comments

CJ web service issues – unable to access WSDL

I’ve noticed issues with connecting to CJ Web Services. I’ve posted a thread on their forum (apparently there was an outage on October 5th. Here are the details of that:

The Web Services system upgrade that was performed last week required a roll back of some functionality in order to preserve 100% functionality of the entire Web Services production systems. The issues have been addressed and are to be deployed Thursday, October 4th. As a result, all Web Services systems will be unavailable from approximately 6:00pm � 8:00pm PDT on Thursday.

Now, I’m unable to hit the following addresses to retrieve WSDL information:

http://api.cj.com/wsdl/productSearchService.wsdl
or
http://api.cj.com/wsdl/rpc_encoded/productSearchService.wsdl Continue reading

September 29, 2007
by admin
17 Comments

Simple script for connecting to Commission Junction’s Product Web Service and populating a local database

Today’s post, I’m going to get back to code.. about time I would say. I thought it would be cool to talk about a way to populate a local database with Commission Junction products. Then you could display those products on your store front. I like to pre-populate a store and use a local database versus hitting a web service so I can speed the experience for the visitor. Web service calls always have a pause, and CJ’s seemed a little slow.

Things we’re going to use to pull this off. You’ll need to make sure all of these requirements are met.

  • PHP
  • MySQL
  • NuSOAP client (for sending/receiving web service requests) — PHP5 users are spoiled with better functionality, and this will not be required, but you’re on your own for sending/receiving the XML, this tutorial covers PHP4 only. You can download NuSOAP here (http://dietrich.ganx4.com/nusoap/)
  • CJ Developer’s web key (http://webservices.cj.com/)

This tutorial will discuss receiving and populating a products database (for example every hour) to maintain a fresh product list from a CJ merchant. When I initially created this I wrote it as a CLI (Command LIne script, where cron was running it every hour). If you plan on using this as a straight up web script, ensure you’ve limited access to it (usually only the web server or your IP only). Another security consideration, this script uses mysql_real_escape_string(), if you’re environment does NOT use SAFE_MODE then you’ll need to add stripslashes() inside of that function.
Continue reading

September 23, 2007
by admin
0 comments

Commission Junction, Banners or Google AdSense?

So you have a web site or web sites, and you’re interested in making money online. Where should you focus your money making opportunities? Commission Junction, paid banners or Google AdSense?

The answer: all 3 (and more)

You should experiment with everything on your site, find out what works and what doesn’t. Google AdSense is a easy way to make some money on the web site, but you could definitely be selling yourself short. Shoemoney now frowns on AdSense on the site saying basically you’re selling your traffic away. Instead of having a potential new visitor to the site, you might be throwing him away for .10 cents. In the end, that visitor could be worth much much more.

Continue reading