There are a few ways you can do this. I'll talk about 2.
Method 1: Buy a professional license management product
I'm the founder of the company that makes LimeLM, which can be best described as hassle-free licensing & online activation. You can associate customer data directly with the licenses. For instance, for a particular product key you can add the customer's email, contact info, and when the license is no longer valid (or when they need to renew). Use the LimeLM web API to generate the product key (adding the data), get when a license expires, and update the data when they renew their license (or however you're selling licenses).
That is, you can automate the entire purchase process. Of course you can still manage things manually, but my guess is you're trying to make the licensing, renewal, and purchasing all automated.
This is a solution for people just starting out or looking for a better licensing system. However, from the tone of your post it sounds like you've got a licensing system already. This brings me to the second option:
Method 2: Create a simple database table
This method assumes you have some programming skill and perhaps even a touch of database experience. It's easy enough to pick up -- Google can fill you in on what's not immediately obvious.
The first step is to create a table that will store your product keys. Below I have a simple example table that will keep track of 5 main things:
- The product key (pkey)
- When the product key was created (ts_created)
- The email of the user (email)
- The full name of the customer (name)
- And when the product key expires (ts_pkey_expires)
Obviously you can expand the table to keep track of more info. But this is a good template to start from:
create table pkeys (
pkey_id serial not null,
pkey char(34) not null,
ts_created datetime not null,
primary key (pkey_id)
) type = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
After you've got the database table up and running you can write a few SQL queries to insert, search, and update the fields in the table.
Which method to choose?
It's a tradeoff. I personally recommend you go with a professional licensing solution, because it's far easier. But if you're anxious to start learning SQL then I'd recommend you try method 2.
I can only speak for my company's product, but using LimeLM to automate this whole process is truly simple. We have full integration examples both on the client side (C, C#, VB.NET, Delphi, Java, etc.) and the server side (ASP.NET, PHP, etc.). Plus we genuinely care about simplifying our customers lives -- if you need any help getting the integration up and running we will help you out.
We have a free plan if you want to kick the tires and see if LimeLM lives up to my hype.
Tell me if this helps.