workflow for a license server / selling software

licensing, php

Solution

For a new product the answer is always:

Don't worry about copy protection. Unless people are actively already pirating your product there is no reason to add a 'phone-home' feature.

Large companies tend to be paranoid about having the proper licenses, so they will pay you for licenses. Most small companies are ethical and any license issues are probably an oversight. Right now you should be far more worried about getting your name out and getting people familiar with your product. Someone using your product at home who would have never paid for a license is a good thing for you right now. Get people using your code, make it so businesses would have a hard time changing to something else, then worry about making sure they aren't using it for free. This is a version 3 problem, if you make it that far.

Problem

I have a product I'm selling. Users purchase a license key and enter that into the config to enable the product. My first idea was.. The product pings the license server w/ the license key on launch, and fails if the server returns a Not Authorized (expired license, invalid etc). But what if the license server is down..? Another idea was to just check the license once, or maybe every 30 days, or just every time it is entered (app reinstalled etc). Is there any safer way (in regard to at least SOME decent protection from script kiddies) of going about this? I've never sold software, but I know how easy it is to reverse-engineer/modify software to avoid requiring a license. And to complicate things, this is in PHP.

Original source