How to protect the code base of the application?

Describe everything as superficial as he yet misunderstood some things, because I experienced this for the first time.

What to eat: a Small narrow CRM'ka for PHP 7

Task: to put the system into the lease, while not passing on the tenant code base.
At first everything seems simple, make a copy of the next application on the server, create a separate database, give the tenant access to the database. But the plot thickens..

Here the task began to become more complicated: it is Necessary to limit tenant our server. That is, the tenant should have the freedom to choose the server: want on my computer at home has launched, I wanted a separate server bought.

Perfect-fantastic (or maybe not) solution: Give the tenant a script, which he places on the server, the script makes the necessary queries to our servers (Tipo PS, these guys have a license? And, well, OK). Pulls files from the configs (database connection) and everything works. The codebase is at the same time on our servers.

Maybe I'm everything to himself as much as possible complicated, I want a kick in the right direction
March 19th 20 at 08:44
5 answers
March 19th 20 at 08:46
The answer is simple: if you don't want to give code, it is not necessary to give. Do SaaS.
March 19th 20 at 08:48
Um... And what hinders to make an API for your application? Write FAQ, give hamsters the client, they work with your server that only accepts requests/gives the data.
March 19th 20 at 08:50
Perfect-fantastic (or maybe not) solution
Yes, so many who does, but files are usually not tighten, because if you decide to crack, it will crack anyway. But verification of the key can be done.
You can obfuscate code. From hacking will not help, but a little complicate him (very much of Juneau)
but a little complicate him

... sale. What fool would buy a standalone CRM, which can not be finished under him after purchase, without recourse to a sharashka-the manufacturer? - Schuyler.Schowalter63 commented on March 19th 20 at 08:53
March 19th 20 at 08:52
March 19th 20 at 08:54
Here is the solution on Zend zend-guard

Find more questions by tags PHP