1

Possible Duplicate:
Code obfuscator for php?
Can I encrypt PHP source or compile it so others can’t see it? and how?
How is it possible to protect PHP code?

I want to encrypt PHP code so that others should not modify and cannot view the code. If I run that encrypted PHP file in the browser its functionality should work. I have used few codes and some software like PHP Bambalam PHP EXE Compiler/Embedder ,phc-win,zzee php etc., with those I am able to encrypt PHP code but failed to run in the server. It was showing Php encrypted code instead of its functionality.

Can any one suggest me a way to encrypt a file which should be free and run that encrypted code in the server?

Community
  • 1
  • 1
User129
  • 129
  • 1
  • 1
  • 9
  • 1
    Take a look at [this](http://www.zend.com/en/products/guard/) – Leri Oct 20 '12 at 13:06
  • 1
    so many duplicates of this question already here on SO. – Spudley Oct 20 '12 at 13:08
  • 1
    It might be helpful to understand who else should not be able to see or even change the code. It sounds as you want to do something about security on the server e.g. access rights rather than encrypting something. If you can give some more details about your requirements I am sure there are a lot of people who can give some advice. – NilsB Oct 20 '12 at 13:13
  • Sounds like an [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). – cmbuckley Oct 20 '12 at 13:15

2 Answers2

1

For ionCube (which I use), you also need the loaders installed on your server:

http://www.ioncube.com/loaders.php

Something must decrypt the file.

CodeAngry
  • 12,760
  • 3
  • 50
  • 57
  • No such thing. You can obfuscate the code (hard to read but still unprotected and php_strip_whitespace() is a start) with free tools but not protect it as it can easily be reversed engineered. You need a byte-code encoder like ionCube which you can combine with your own licensing system to protect commercial PHP scripts. – CodeAngry Oct 20 '12 at 13:28
0

You don't need to do this. PHP code is run on the server, the browser never downloads it.

Collin
  • 11,977
  • 2
  • 46
  • 60