views:

873

answers:

7
+1  Q: 

Encrypt php code

Hi all, I create a software using php. Now need to sale this software .So, I need to encrypt my code that nobody can view my source code. can anybody help me to do: 1. Encrypt my PHP code but software functioning will remaining same. 2. Also I need to bind the software for a particular authorized pc & it will not run any other pc except my authentication. How can I do that? encrypt using LAN MAC address? or any other idea? pls help!

A: 

What you may be looking for is not cryptography per se, but rather obfuscation. If you Google for "php obfuscate", many choices show up. The first one is from Raizlabs.

Christopher Morley
+1  A: 

SourceGuardian will do what you want.

+3  A: 

I put together the following list a ways back - don't know if they are all current, or how many are now free, but you should find something useful here:

About:

  1. Wikipedia article: PHP Accelerator
  2. Comparison of APC, Zend, xCache, & the Zend Framework

Software:

  1. PHP's APC (PECL page)
  2. RoadSend
  3. Turck-mmcache
  4. eAccelerator
  5. PHP-Accelerator
  6. SourceGuardian
  7. NuSphere Nu-coder
  8. Gridinsoft
  9. IonCube SA-Encoder.php

Another thread on SO that adds a few more (check it out):

http://stackoverflow.com/questions/470409/can-i-encrypt-php-source-or-compile-it-so-others-cant-see-it-and-how

  1. Zend Guard
  2. BCompiler (PECL page)
  3. PHC
SamGoody
+2  A: 

Why do not you use ionCube or Zend Guard?

Alexander Elgin
A: 

See SD PHP Obfuscator for a reliable PHP obfuscation tool.

Ira Baxter
A: 

You can't run code if it's encrypted.

Longpoke
.......lolumad?
Longpoke