Greetings,
I have a PHP/MySQL application that I am deploying at a client's.
I am fairly certain that they will steal my source code and re-sell to
other companies.
I would like to somehow protect the source code.
Here are some of the options I have thought about.
Can someone give me some ideas and feedback about these --
1. Host the most critical .php file on my own host server, and
everything else on their's.
I modify the HTML form elements to submit data to my site (using a
full URL, rather than a relative one).
The php file then connects to the database on their server using
the full host name or IP address.
After doing the processing, it redirects back to their site.
This solution is complex, there is a performance impact, cookies won't
work across sites, and there is a liability issue for me if my host
server is down and their business stops because of that.
2. A less complex solution is to rip out some of the key functions
from the .php files and host them as an include file on my server.
This way, the cookies will still work as-is, and there is a
slightly less performance impact.
But we still have the issue of their site being dependent on mine.
3. Use an obfuscator that sits between the web server and the PHP
runtime and encrypts/decrypts the .php files on the fly.
I have looked at some common obfuscators and they are no good.
All they do is replace function and variable names with some gibberish,
but a simple Find/Replace using Notepad can break the obfuscation.
Can anyone recommend a real obfuscator that is less stupid than the
person stealing the code?
4. The last option is to rip out the important functions and put them
in a C++ DLL and call the DLL from the PHP code.
This solution appeals to me the most, but means a lot more work for me.
I don't know much C++, but I know enough to write simple functions.
But I don't know which C++ to use - like which compilers, etc. so that
the DLL runs on their environment.
I think their host is UNIX/Linux based, but not sure which flavour.
Any help appreciated.
Thanks,
Harold.
I have a PHP/MySQL application that I am deploying at a client's.
I am fairly certain that they will steal my source code and re-sell to
other companies.
I would like to somehow protect the source code.
Here are some of the options I have thought about.
Can someone give me some ideas and feedback about these --
1. Host the most critical .php file on my own host server, and
everything else on their's.
I modify the HTML form elements to submit data to my site (using a
full URL, rather than a relative one).
The php file then connects to the database on their server using
the full host name or IP address.
After doing the processing, it redirects back to their site.
This solution is complex, there is a performance impact, cookies won't
work across sites, and there is a liability issue for me if my host
server is down and their business stops because of that.
2. A less complex solution is to rip out some of the key functions
from the .php files and host them as an include file on my server.
This way, the cookies will still work as-is, and there is a
slightly less performance impact.
But we still have the issue of their site being dependent on mine.
3. Use an obfuscator that sits between the web server and the PHP
runtime and encrypts/decrypts the .php files on the fly.
I have looked at some common obfuscators and they are no good.
All they do is replace function and variable names with some gibberish,
but a simple Find/Replace using Notepad can break the obfuscation.
Can anyone recommend a real obfuscator that is less stupid than the
person stealing the code?
4. The last option is to rip out the important functions and put them
in a C++ DLL and call the DLL from the PHP code.
This solution appeals to me the most, but means a lot more work for me.
I don't know much C++, but I know enough to write simple functions.
But I don't know which C++ to use - like which compilers, etc. so that
the DLL runs on their environment.
I think their host is UNIX/Linux based, but not sure which flavour.
Any help appreciated.
Thanks,
Harold.
Comment