views:

233

answers:

8

What is the best way of protecting my source code from being distributed without permission.

I've thought of perhaps moving my source to another server. Also toyed with the idea of obfuscating my code, but this might make it a pain to alter at a later date.

Has anyone any better ideas?

+2  A: 

Use Zend, and keep hopes that byte code can't be disassembled into readable source code..

skrat
If there's a will, there's a way.
Chris Charabaruk
+1  A: 

There is a PHP Compiler called PHC. It's still in early development but it has very talented people on board.

Ólafur Waage
+1  A: 

Another popular one is ioncube. Requires the ioncube software to be installed on your server though. It's also quite expensive at $199 for the standalone version.

I've just noticed their online version may be much cheaper (although having never used it I'm not sure how expensive it would eventually work out)

See here for cost: http://www.ioncube.com/pricing.php

ianhales
+1  A: 

You could check this list of php obfuscation solutions.

KB22
+4  A: 

You cant really stop people if they really want to steal your code, you can only make it harder. Even without the source they can still study and copy your ideas to some extent. The nice source just makes it easier as they have a starting point.

mP
+1  A: 

If you can host the software you can keep it under-wraps. Any software you distribute must be able to unencrypt itself so the OS can run it. At that point, it can often be reverse-engineered, de-compiled, etc..

The other alternative is to write really bad code or an uninteresting program. In that cases no one will want to copy it, if you you make it available to download for free. For example of such projects, see the last page on Ohloh.

brianegge
Excellent point, now - for the first time - I understand why the Java distribution model was based on the code staying on a server and fee for service being the method of distribution. Should still work even though Java is open for discussion. That's an idea I will keep in mind as I thought about this for years and decided the only solution was to have an operative that runs a disk on target machine and build in detectors. Any ( like you say )
Nicholas Jordan
A: 

Maybe the new Phar file format is a cheap solution?

powtac
A: 

You can try myows. It is free and it helps you protect your code.

Saif Bechan