Coding For Online Success

September 29, 2007
by admin

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 (
  • CJ Developer’s web key (

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 28, 2007
by admin

Build A Niche Store (bans) – Security issues are being addressed (continued)

So the drama continues. Apparently all the issues that I have brought up are ‘cosmetic and not security related’ coding issues. I raised 5 different points, 2 of which they said they would implement (funny … since they are cosmetic) in the future. The other 3 (1 they just don’t get at all and the other two are up for debate in my opinion).

Cosmetic would mean, I didn’t like the ‘grey’ that they used in the header.. not the issues I brought up. Security related, even though some are mild, and I’ve stated that, are still security related.

Continue reading

September 26, 2007
by admin

Build A Niche Store (BANS) – Unsatisfied Programmer

I title this entry “BANS – Unsatisfied Programmer” and not Unsatisfied Customer for a reason. The last few days have been a very disturbing few days in regards to BANS customer service. It started with me wanting to explore BANS as a possible opportunity for my wife to quickly build affiliate eBay stores while I work on other projects. I current ‘roll my own’ eBay script but to roll out new stores takes some work, since I built mine without admins (since I’m the one administrating them anyway), and that’s not an ideal solution for my wife. Here is where BANS comes in, basically I wanted to be able to hand the reigns to the wife, and say have at it. And I wanted to do this without spending a lot of time (cough).

Continue reading

September 25, 2007
by admin

BANS – security issues are being addressed

So I’ve made contact with Kelvin at Build A Niche Store, and his response was fantastic. I was extremely worried that he would take it personally and deny that there are any problems. But instead he was very responsive to my email and accepted my offer to see diffs that I’ve done to the code, etc.

He stated that there have not been any problems with performance, functionality or security related to the issues that I brought up, but was willing to address these issues with his programming staff. This is all I wanted to hear.

I’ll continue to work on the code on my end, and will also continue to offer more diffs as items get checked off of my list. If you’re a current BANS customer, I would keep a close eye for upcoming updates. Continue reading

September 24, 2007
by admin

Build A Niche Store – Security Issues

Today I purchased BANS (Build A Niche Store) so I could have my wife work on getting some eBay affiliate shops up while I work on other things. Thought it would be a nice turn key operation for her to quickly get in the field of affiliate marketing. I do have to say the look and the basic functionality is outstanding, and the incredible ease for creating the store.

But, I’m a coder, first and foremost, and while I was configuring the application I started to notice ‘interesting’ issues with the application. I do NOT want to disclose specific issues, until the folks at BANS update their code. I’ve notified the head guy there are about the issues (and there were a few). I myself have started to fix a bunch, but this will take some time.

Continue reading