Page 1 of 1

How to keyprotect a script?

Posted: Sun Jun 29, 2003 2:44 pm
by GK
Hi all

i made a script and soon i will make it availible for people to buy

How do i key protect my script?

Each buyer is allowed to only use it on 1 domain or server

Posted: Sun Jun 29, 2003 3:07 pm
by m@ndio
I dont think there is any good way of doing this.... hence why there is so much hacked and cracked software out there...

What you could do however is in one of your scripts enter a special registration key (like all licensed software has) hidden away and get the script to query your server and check maybe a text file or database for a match if the key exists in the text file then they have obviously bought the software, else they have nicked it so throw up some errors.

It does not need to be complicated.

Hope this helps

Posted: Sun Jun 29, 2003 3:16 pm
by GK
can u give me an example in code?

Posted: Sun Jun 29, 2003 4:52 pm
by qartis
No completely open-source code can have copy protection. The closest thing is probably that Zend program, that will garble your code and hide copy-protection. If you want your code to be editable, you'll have a really hard time enforcing any licence.

Posted: Sun Jun 29, 2003 6:03 pm
by nielsene
That's not entirely true. You could set up a script such that it has to query a central server for some key functionality. The request has to be signed with an appropriate digital signature that binds an installation to a given ip/platform.

Of course the parts of the system which handle the request processing has to be non-distributed source, but it can be a seperate application so its not required for release under a GPL'like license.

Constructing such a system is very tough, and means that you have to do lots of crypto per request on YOUR server to support your customers. Its non-trivial and I don't think anyone here is going to code up an example for someone else.

However, nothing says that a script written in PHP has to be open-source. With user of Zend Encoder (I think that's the name of the program that psuedo compiles PHP) or similar, you can distrubte a "binary" which still requires the proper license file as most shareware programs do. Again ,its not a trivial coding project and I don't know of any samples off hand.

Posted: Sun Jun 29, 2003 8:23 pm
by Wandrer
http://www.ioncube.com/online_encoder.php

The ionCube online encoding service is a unique alternative to purchasing an encoder. Encoding costs from as little as just US $0.50 per job, and is ideal for users with modest or occasional encoding needs. The online encoder has the same important features of security and runtime performance as found in our standalone encoder product, and you can use the online encoder to:

-) Encode a single file.
-) Encode an archive containing PHP scripts and any other file types.
-) Make FREE test encodings or a pay-to-download encoding.