I want to sell my source code, it's written in PHP and CodeIgniter. And it's actually a CMS for personal website. My intention is to create only one license for one use only, if someone buy this code and install it on his/her server, then when he/she tries to install it again somewhere else, it can't be done. Software in this context is a web application and I just want to figure out how to create a licensing for each customer. Is there any way to do this? Or is it just impossible?

  • 1
    That's a terrible concept anyways. Don't bother. – Slava Knyazev Jul 19 '16 at 3:41
  • @SlavaKnyazev Then what is better concept? Any suggestion? – stormrage Jul 19 '16 at 4:09
  • 3
    Just serve it up from your own server and have them point their A-Record at your server. And hope your server doesn't go down because they will hunt you down more than likely depending on how much you are charging. – jwize Jul 19 '16 at 4:41
  • 2
    Your suggesting implementing a very aggressive DRM system...people don't like DRM so you have to be sure you have a very good product to get them to look past it – Sutty1000 Jul 19 '16 at 7:51
  • There are some products designed for this. But I have no idea if they work sufficiently well, or would be cost effective for you. Honestly, I don't see the point of doing this for a 'personal CMS' written in PHP when there's a million of them already out there. – GrandmasterB Jul 20 '16 at 3:23

There is something called Copyright Law which already protects you from this. In general, if people are willing to break the law, they will probably also be willing to break whatever mechanism you put in place to prevent them from breaking the law.

If you want someone to be able to run your program, you have to give them the program. There is no way around that. You can employ any amount of obfuscation, indirection, encryption, and protection you want, ultimately, you have to give them all the keys so that they can run the software. And in order to run the software, the CPU has to understand the software. CPUs are much stupider than people, so if a CPU can understand the software, then people can, too, and they can reverse engineer and remove whatever mechanisms you put in place.

There is only one way to make this work: don't give them the software. Run it yourself, and only give them access to it. Note: a variation of this, is to give them a sealed box with the software on it to run themselves. But even this is tricky, this is e.g. what gaming console manufacturers (try to) do, and pretty much all of them have been broken.

Or, the alternative: don't do business with criminals. Establish a culture of trust and honesty between you and your customers, not fear and paranoia.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.