Using a PHP Encoder to Protect your PHP Application
The beauty of the scripting language such as PHP is in the ability given to PHP developer to change the source code and see the result right away. However, the openness of PHP source code can sometimes be a disadvantage in some situations where you might not want your application code to be so open. In this review we'll cover how to use a PHP encoder to leverage the power of PHP in a way that protects your source code from un-authorized modification or reverse engineering.
Why Should you Encode your PHP Applications?
There are many reasons why you might like to encode or obfuscate your PHP source code from your customers, including protection of your intellectual property, increased application performance, and even protecting yourself from the technical support problems that arise from un-authorized modifications made to your PHP Source. Luckily, there are several PHP Encoders on the market that come to the rescue, and in this article we will take a look at
Nu-Coder – a PHP Encoder from NuSphere
How to Use a PHP Encoding Utility
NuSphere is well known for PhpED, their PHP IDE which has previously been reviewed by the php-editors.com staff. Nu-Coder, their PHP encoding utility, helps you take what you've developed and distribute it in a safe and secure way. It's reliable and stable, and based on the tests we put it through, we think it's a viable alternative to Zend or IonCube offered at a relatively attractive price.
How does a PHP Encoder protect PHP scripts?
A PHP Encoder utility such as Nu-Coder encodes your PHP scripts by converting the source code of PHP Script into compiled PHP bytecodes. In addition to hiding of the source you also get the performance boost from loading the precompiled byte codes directly to PHP Engine. Nu-Coder features Command Line Encoder for Unix, Linux and Mac OS operating systems, a Graphical and Command Line Encoder for Windows, Support for both PHP versions 4 and 5 – all in one executable and of course a faster running of PHP files. There are two ways to run Nu-Coder:
- Command Line Interface: Lets you to encode the entire directories of files, specify which version of PHP you are encoding for, turn short tags support on and off and many other options
(PHP Encoder CLI - Click to Enlarge)
- PhpED Integration: Nu-Coder is also tightly integrated in PhpED version 5, with a nice "Encode before upload" feature. Nu-Coder integration is done at PhpED’s Project Level
(PHP Encoder UI - Click to Enlarge)
To run PHP files encoded with Nu-Coder you will of need a server side loader to load the compiled bytecodes. In case of NuSphere, such a loader is PhpExpress, available for free download from their website. As a test, we ran it on the source code for the php-editors.com website and saw a moderate performance increase in terms of faster page loading times, etc. Stay tuned for benchmarks for all of PHP Accelerators out there. Overall, it does a good job speeding up the scripts of php-editors.com.
Still, we'd like to see some more features. First and foremost, we would like to see support for the ability to specify the way to license a PHP Application and control how it is distributed to the end users; the ability to expire the scripts loading after certain time period, enforcment of the number of servers where the applications can be installed etc. Another important feature expected of PHP Encoder is the support the obfuscation of scripts. We like the integration with PhpED, but having a stand alone GUI in addition to the command line interface would not hurt either in case you're not using PhpED.
The price is very attractive; PhpED customers can get Nu-Coder just for $67 and that's a lot less than competing PHP encoding products including Zend's Guard and any others. It also includes 1 year of free upgrades. Standalone Nu-Coder is also available at the introductory price of $149.
Nu-Coder proved to be very robust in our testing. - Overall considering the price, functionality and power of Nu-Coder, we highly recommend this product to php-editors.com readers. You can check it out for yourself by downloading the free trial.
The Php-editors.com Review Staff