473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

licence key generation

Hi,
I'm looking for a php code that I can use to generate lience key that is
activated between 2 dates.

Any hint please.
Jul 17 '05 #1
6 1772
toufik toufik wrote:
Hi,
I'm looking for a php code that I can use to generate lience key that is
activated between 2 dates.

Any hint please.


More information needed... You'll need a database with 3 fields, key,
start, end. Beyond that, we'd need to know what you are trying to
accomplish.

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com
Jul 17 '05 #2

"Justin Koivisto" <sp**@koivi.com> wrote in message
news:tx*****************@news7.onvoy.net...
toufik toufik wrote:
Hi,
I'm looking for a php code that I can use to generate lience key that is
activated between 2 dates.

Any hint please.


More information needed... You'll need a database with 3 fields, key,
start, end. Beyond that, we'd need to know what you are trying to
accomplish.

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com


Thanks Justin,
What I need execaly, is how can secure my key, so that my customer couldn't
create it himself.
All this because the customer can see the source code.

Toufik. ti****@gvs.ca
http://www.gvs.ca
Jul 17 '05 #3
toufik toufik wrote:
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:tx*****************@news7.onvoy.net...
toufik toufik wrote:
I'm looking for a php code that I can use to generate lience key that is
activated between 2 dates.

Any hint please.


More information needed... You'll need a database with 3 fields, key,
start, end. Beyond that, we'd need to know what you are trying to
accomplish.


Thanks Justin,
What I need execaly, is how can secure my key, so that my customer couldn't
create it himself.
All this because the customer can see the source code.


OK, so what you are doing (as an example) is:

1. Selling useage licenses to some PHP scripts for a client

2. You only want the licenses to work for a certain date range (like
from now until a year from now)

3. Clients will need to pay fees to renew the license or the scripts
stop working.

There are a few ways you can do this. First the paranoid license keeper way:

You will need to have some kind of permanent database set up. Use 3 fields:
id - varchar(32),
startdate - timestamp,
enddate - timestamp

Then, in the application that uses the licenses:
<?php
$q="SELECT count(*) FROM script_licenses WHERE id = ".
"'$customer_code' AND startdate >= '".time()."' ".
"AND enddate <= '".time()."'";
// do the query, get result into $result

// if the entered license is good, the result should be 1
// if not, it should be 0
?>

You'll want to do that only once per request or session so you don't
slow down the client site too much, and keep your database server from
getting pounded too hard.
OK, that's really all I can think of right at this moment. However, you
should be able to set up a file that contains some kind of encrypted
string that contains the start and end dates that the script will run
for. Of course, by giving the client a file that has the keys, they may
be able to decode it by searching the source code.

Also, one thing you may want to look into is Turck MM Cache and its
encoding:

http://turck-mmcache.sourceforge.net/index_old.html

I've yet to have a chance to play with it, but it does look a bit
promising. I know that the server-side install only took a few minutes. ;)

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com
Jul 17 '05 #4
>What I need execaly, is how can secure my key, so that my customer couldn't
create it himself.
All this because the customer can see the source code.


If the customer can see the source code, the customer can modify the
source code so it doesn't require, look at, or need a key.

Gordon L. Burditt
Jul 17 '05 #5
"toufik toufik" <to*****@sympatico.ca> wrote in message
news:yL********************@news20.bellglobal.com. ..

"Justin Koivisto" <sp**@koivi.com> wrote in message
news:tx*****************@news7.onvoy.net...
toufik toufik wrote:
Hi,
I'm looking for a php code that I can use to generate lience key that is activated between 2 dates.

Any hint please.
More information needed... You'll need a database with 3 fields, key,
start, end. Beyond that, we'd need to know what you are trying to
accomplish.

--
Justin Koivisto - sp**@koivi.com
http://www.koivi.com


Thanks Justin,
What I need execaly, is how can secure my key, so that my customer

couldn't create it himself.
All this because the customer can see the source code.

Toufik. ti****@gvs.ca
http://www.gvs.ca


For that, you need a asymmetric cipher like RSA. It's possible to implement
that in PHP, although most servers don't have the GMP extension. Besides, as
Gordon said, if your customers can see the source code, then they can
comment out any restriction you put it.
Jul 17 '05 #6
Justin Koivisto <sp**@koivi.com> wrote in message news:<kj*****************@news7.onvoy.net>...
<snip>
Also, one thing you may want to look into is Turck MM Cache and its
encoding:

http://turck-mmcache.sourceforge.net/index_old.html


I'm not sure if it will work with PHP 5 _though_ many claim so.

Zend, "The PHP company" hunted Dmitry Stogov, the author of Turck
MM Cache by the end of 2003 and he seems to be working for Zend
accelerator. phpSt.Manuel Lemos was suggesting him to update the
license to non-GPL; but he doesn't seems to get any reply. More
politics and flames here
<http://sourceforge.net/forum/forum.php?thread_id=986362&forum_id=236228>

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Google alias | last post by:
My trial period for Zend studio has just ended, I've requested a personal licence, and got it. After I've entered and rebooted by computer I still get a popup saying "Licence expired!" everytime I...
0
by: Jakov | last post by:
Ok there are some issues about LGPL licence. I am not a lawyer, and reading LGPL licence is making me confused. This is my problem. I have woking on some commercial application, all the software...
17
by: Laszlo Zsolt Nagy | last post by:
Hi All! I know there has been a post about Python licencing but I have different questions. I tried to Google for "Python Licence" and "Python Licencing" but I could not find the answer. Is...
2
by: Dave | last post by:
Hi, Can anyone suggest a way to generate a licence key from C/C++ program? I want to create a licence file include an encrypted text and an expiry date. The private key is hard coded in the...
3
by: DD | last post by:
I am after help in generating the code... The end user enters a licence no in the software to use the software as you do with Microsoft products. Can anyone help Regards DD
2
by: JezB | last post by:
I have a windows application that I'd like to sell eventually. What's the simplest way to provide a secure licensing mechanism ? I'd prefer to have a licence key that can't simply be distributed...
6
by: Hani Atassi | last post by:
If i am using a form type authintication, do I need a licence for each logged in user? The application maintain their own user list and they are not Windows accounts. If I am using SQL Server...
84
by: John Perks and Sarah Mount | last post by:
we have some Python code we're planning to GPL. However, bits of it were cut&pasted from some wxPython-licenced code to use as a starting point for implementation. It is possible that some...
9
by: ravindarjobs | last post by:
Hi friends, i am progamming to generate UPS labels in asp.net 2.0 when i sent the follwoing xml request to UPS development server, it say invalid licence code. But indeed mine is original...
1
by: IanWright | last post by:
I'm trying to think of a suitable licence model for a toolkit that I'm designing, and have come up with the following, and would like thoughts / opinions or suggestions that people can offer. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.