I have a small "Business Activity Monitor" written in Java. The program is usually installed on the server of my customers and it accesses their database and brings informations about the data obtained. My goal is to write a version of the program for the Web. I've actually written one in PHP. However, for the web application to access the database on my customer's server, I need to leave the source code inside the server machine. And that I cannot do (security reasons). So: is there anyway to write an application that would access my costumer's database and perform the necessary data manipulation without having to leave the source code on his machine? I hope I made myself clear!
-
2So, what is your actual coding issue? – Script47 Jan 12 '16 at 12:57
-
2Ask you customer to add your servers IP to his SQL servers remote connections whitelist – Steve Jan 12 '16 at 12:58
-
Tunnel via SSH into the client's machine. – tucuxi Jan 12 '16 at 13:06
2 Answers
You could do it by making a central server where you do the actual processing (whatever you want to do). But that means it's a lot of work and if it's customer data, you need to make the connection really safe.
If you don't want to do it this way, it's better to leave your script at the server. You could try to obfuscate it, but that means you're just making it harder to read.
Also don't make the mistake of thinking writing in java automatically "hides" my source. It's compiled but you can decompile java code also.
An example of this: http://jd.benow.ca/

- 3,115
- 3
- 30
- 45
Possible answer: compile the php code
see it here: Can you "compile" PHP code?
For example, http://www.phpcompiler.org/ is able to compile your php files into a relative secured binary format.
Disclaimer: I don't use it myself, and don't write php anymore since a decade