views:

243

answers:

5

It is in an area, about which I don't now anything, but it's very important, I think.

Just now, I'm finishing the script of big portal. But how can I be sure that the client will not use my script in other sites?

Are there any script hash algorithms?

Please help me to understand how can I protect me, and my script...

+8  A: 

You can use Zend Guard or any other PHP obfuscator.

fabrik
I don't like Zend Guard solution, since, for what I've understood, it makes you dependent on their "service". On the other hand, obfuscation does not prevent usage outside the specific "site" s/he wrote the code for: the client can give it "away" to partners or whoever for free. (And obfuscation can be deobfuscated)
ShinTakezou
You're right: no real defense here. I've wrote some tips for the question only.
fabrik
+6  A: 

Legally you can write a license, which will describe how your code can be used. If you did that job for money then your client can consider that code is theirs. So you have to explain that you didn't sell the code, but gave them it under certain conditions. If they violate your license you will easily sue them and win. But you might need to consult lawyer if you are serious about that.

Other way is obfuscation, check fabrik's answer. But if you created CMS it can easily be customized and placed to other site without code modification.

Here is the difference between product and service. If you provide service and write code for money the client will became owner of the code and he can use it in any way he likes. If you are selling a product it is cheaper then custom code, but you are owner and you give your product with license which clearly tells about conditions.

You should discuss what are you selling to your customer with him before starting project, because your intuitive understanding might be different from your client's.

Andrey
+1  A: 

Copyright would be the easy part. You could add a legal notice to the script and restrict the usage. But that wouldn't protect it physically.

Obfuscation would add some protection to the script, it would be much harder to modify it but once it has been de-obfuscated, it's again public domain from a hackerz point of view. At least you could use the obfuscation to check via google search if someone had copy'n'pasted the (obfuscated) script and used it illegally.

The only way to protect your intellectual property is to leave the code on your server.

Andreas_D
"intellectual property" is such a nonsense term! code can have a owner; ideas can't have a owner. I can't get the sense of the "intellectual" adjective. It is not intellectual, it is "personal" property, "corporate" property... Luckly s/he's trying to "sell" code, a "digitally material" matter, that can have a owner... (Comment just because I shudder each time I read "intellectual property":D)
ShinTakezou
A: 

Okay you want to sell script to clients and you dont want them to sell/use it further, If i guess right.

Then do the following.

Encrypt it using Zend Gaurd

Make it work only on key that work for particular ip(s) .

So client purchases it and can tell what ip they will use it .Generate ip specific keys.

Arsheep
+2  A: 

to answer your question:

you should agree on some kind license with the client. it would not protect the code though, but you would have proper legal grounds if they use it for something else.

however, my personal note on stuff like this:

any project i do, i assume the code (or part of it) can be re-used elsewhere, and frankly i take it as a compliment if they reuse it. i get paid to do a specific project, and what they are doing with whatever i produced is up to them.

software development are driven by innovation and forcing people to re-invent the wheel is just bad for all of us, and gives us s**t like software patents.

so, my advice would be: get the client to agree on a license, but assume that it the project or parts of it will be re-used, but thats part of life (and software development)

its better to invest your energy in learning more stuff and building good relations with clients; that way you will surely get other projects and be a happier person than trying to protect your code and hunt down those that re-use your code (which frankly, will be a battle you will never win)

i have had several projects where clients have come back to me and started a conversation like:

"hey, we took the code you did at XXXXX and tried adapt it to be used in YYYYYY. works excellent, but now we want to do ZZZZZZ as well, can you take on that project?"

i doubt they would get back to me if i had forced them to agree to not re-use the code;

they would probably re-used the code anyway but gotten in touch with another developer to do the new development to make sure i would not find out that they re-used it.....

just my 2 cents and philosophy about this topic, seems to work for me so far.

JohnSmith