Product Key Questions
Author |
Message |
Nathan4102
|
Posted: Thu Jan 16, 2014 10:15 pm Post subject: Product Key Questions |
|
|
Ok, so this is what I've been attempting to explain in the chatbox:
Basically Im selling an application to a small business owner(Lets call him A) who in turn is selling the program (for use, not resale) to other businesses(Lets call them B). We're planning on using 1 month, 2 month, or 6 month keys, and after the key expires, the user has to enter in a new key to continue using the program. The keys will be supplied by me to person A for a fee, and he'll market the program and sell keys.
I need to figure out a way for the program to know when a key has been used. Like person A could sell the same key to 20 different people, and they'd all work fine.
AFAIK the only way to do this would be to use some sort of web service, but I know next to nothing about web services (I mean, I can make text bold, and I can make it italics, thats about it )
Is there some easy way to make the program check my web server for used or unused keys? Or is this way to complex for a web novice?
Thanks to those who've attempted to help! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
|
|
|
|
Nathan4102
|
Posted: Fri Jan 17, 2014 10:35 pm Post subject: RE:Product Key Questions |
|
|
Dang, looks like its not super simple. Ill try to figure it out though, and Ill come back here if I need more help. Thanks tony |
|
|
|
|
|
mirhagk
|
Posted: Sun Feb 16, 2014 9:30 pm Post subject: RE:Product Key Questions |
|
|
If you want to just create a simple web service I'd recommend just a simply nodejs web server and mysql database.
code: |
var mysql = require("db-mysql");
new mysql.Database({
"hostname": "localhost",
"user": "user",
"password": "password",
"database": "test"
}).connect(function(error) {
if (error) {
return console.log("CONNECTION error: " + error);
}
this.query()
.select(["id", "user", "email"])
.from("users")
.where("role IN ?", [ ["administrator", "user"] ])
.and("created > ?", [ new Date(2011, 1, 1) ])
.execute(function(error, rows, columns){
if (error) {
console.log('ERROR: ' + error);
return;
}
// Do something with rows & columns
});
});
|
You can simply have a single table of keys, and a counter of how many applications accessed it, and a way to return a result key. |
|
|
|
|
|
|
|