Log in

View Full Version : PHP Licensing system



Ryzie
24-08-2008, 02:17 AM
I have been planning to make a PHP Licensing system for a few days, except I'm having a little bit of trouble.
Coding isn't a problem.
Just that, If I make users put a script onto their products, why can't purchases just remove the script.

Please help me, with any ideas, on how I could do this.
Thankyou :)


Ryzie.

Dentafrice
24-08-2008, 01:05 PM
I have been planning to make a PHP Licensing system for a few days, except I'm having a little bit of trouble.
Coding isn't a problem.
Just that, If I make users put a script onto their products, why can't purchases just remove the script.

Please help me, with any ideas, on how I could do this.
Thankyou :)


Ryzie.
Nothing is stopping them from removing the script, hence why you need to use an encoded file.

Use some logic here..

Encode the installation file, during installation have them input their key, then query your server.. if it is right it returns an encoded version of your core, inside the core is the main check system (which communicates with your license server).

That way if the key is not valid, the main communication point in the application (the core), is not going to work.

Here's how it would work in my situation.

-- TehUpload
---- core
----- database
----- upload
----- user
------- album
----- filemanagement

All those are under TehUpload, which is under core.

If you remove the core.. here's what happens.

-- TehUpload
---------------
----- database
----- upload
----- user
------- album
----- filemanagement

There's no communication point between the application and the rest of the things. Would work logically, not sure if it would work practically

redtom
24-08-2008, 02:58 PM
Basicly do what celeb said.

Encode a key file and include the lisence script in that.

MrCraig
24-08-2008, 03:32 PM
Kinda hard to do though as you'll have to encode all your clients functions files using ioncube or zend unless people would find a way to hack out the licencing system. :S

Youd probably have to stick to just obfuscilating it and use ioncube to encode the de-obfuscilating file and then try find a way so users cant echo out the de-obfuscilated code. :S

Dentafrice
24-08-2008, 05:22 PM
Not all of them, you only need one file encoded, as well as the installation files.

All of the files can be normal, except the core.

MrCraig
24-08-2008, 07:40 PM
Noo i meant:

All - referring to the clients he has
functions files - meaning the function file each of his clients has :P

iUnknown
24-08-2008, 10:39 PM
Just encode the file that relates to the licensing and make sure that if they delete the file everything stops working, rather than being able to continue somehow.

Easiest if everything is encoded.

Dentafrice
24-08-2008, 11:22 PM
Yeah, but it's a pain, and nobody can develop for it.. so it's easier with my method.

VistaBoy
24-08-2008, 11:26 PM
Yea as Dentafrice and someone else said just encode your install files and a core/license file.

Dentafrice
24-08-2008, 11:27 PM
Just have it in the construct of your core, that when it is constructed, it automatically calls a function inside which does the license checking.

Hypertext
25-08-2008, 03:30 AM
Are we talking pure PHP?

Because if so, it's near impossible to stop somebody nullifying/unlicensing software.

Ryzie
25-08-2008, 08:53 AM
Ok, Change of Plans then.
Any ideas on a site I should make?

Doesn't matter how complicated it is, I'm just wanting a sweet idea.
Thanks :)


Ryzie

Dentafrice
25-08-2008, 07:53 PM
Are we talking pure PHP?

Because if so, it's near impossible to stop somebody nullifying/unlicensing software.
It's possible to make it not able to be removed, but it's not possible to let them figure out how it works ;)

Hypertext
26-08-2008, 01:15 AM
My personal way would be to have some core functionality that calls method, off your own server, for instance an API type thing, whereas you only give out the client. :)

timROGERS
26-08-2008, 08:25 AM
The thing is that it's actually really quite difficult to make a catch all licensing system for release. The main reason is that it requires the person to know the licensing script well before they can integrate is effectively and securely. If they don't know the system, then they'll probably leave a hole and they will have wasted their time. For this reason, in my opinion is it best to code a customized license system for each application, preferably coded by the writer of the software it's for.

When I have made scripts in the past, I have tried to avoid licensing and obfusucation because it stifles the creativity of users. For example, if you want to allow plugin development, people need to see the code really. In the past I have thought of having one protected file with just licensing functions and a core function, but the problem is that if some really wanted to they could rewrite the core functions to get around it.

For this reason, my applications have tended to have open sources, and just because I'm kind :)

Tim

Dentafrice
26-08-2008, 07:59 PM
My personal way would be to have some core functionality that calls method, off your own server, for instance an API type thing, whereas you only give out the client. :)

That's what I just said.. when the class is constructed, have it automatically call a check function, which then returns the output on whether or not it should continue.

Want to hide these adverts? Register an account for free!