2

I'd like to protect the PHP and JavaScript program source code from the prying eyes of my client. How can I do that?

2
  • see: stackoverflow.com/questions/498704/… Commented Sep 22, 2009 at 13:50
  • 3
    write some really crazy code using terrible names and bad formatting, like some people I know. that will cause them fits for years to come, and they will wish they couldn't actually see the code ;-) Commented Sep 22, 2009 at 13:59

4 Answers 4

6

your javascript source is fair game I'm afraid. You can minify it, you can obscure it and compress it but you can't hide it.

if you are storing PHP files on your clients server, then this issue will be difficult to overcome also.

Apparently there are some PHP encrypters available but they have an adverse affect on performance.

So yeah, not much you can do really. Especially if your client is technically savvy.

Sign up to request clarification or add additional context in comments.

1 Comment

IMO all you need to do is make breaking into your system (slightly) more expensive than buying a new license from you then thats about as best as you can do on an adhoc basis. After that you have to start investing in all sorts of other technologies that will screw around with things [ie Port your php to C++ ]
2

If someone has access to your source code it will always be susceptible. The best you can do is obfuscate it ala Google-JS style but it can always be reverse-engineered.

And what makes your application so special anyway? Unless it's some sort of program for something like the government I don't think you should really give a care.

3 Comments

er... my boss think it is important.. ... :P
@Ted Wong - I have had the same problem with my boss for some .Net systems .. so I feel you pain .. lol
@Bombe - some of us enjoy being employed :)
1

Use a javascript obfuscator.

Jasob :: JavaScript Obfuscator - CSS Obfuscator

Although it won't be 100% irreversible. Just makes it hard to read and understand.

For PHP

PHP Obfuscator

and

Code Eclipse

Comments

1

Given you are using a scripting language that is interpreted at runtime, your options are limited:

1) Run the most sensitive parts of your application on your own server and have the client access them over web services.

2) Code obfuscation (this is reversible with enough effort).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.