Go To Part 2 of Encoding PHP Files to Protect your PHP Application

We will now move on to:

Encoding PHP Files to Protect your PHP Application

Generating License for protection of PHP Files

License tab of Encoder properties section is used to tell Nu-Coder to generate the license file for the project. The user needs to click on Create New License to start the UI for License file specification.


PHP Encode License Tab
(PHP Encode License Tab - Click to Enlarge)


We generated our license to expire on the certain date in the future, which is useful for a demo/trial version of the application, however the typical setup would be expiring the license after certain interval of time. This option is also available in Nu-Coder but only in Command Line Interface of License Manager. It actually makes sense, because you are most likely to take advantage of this option when running Nu-Coder on your download server, generating these licenses on the fly.

We were quite impressed with the flexibility of License Manager in Nu-Coder. We believe that the options to link the license to particular host, IP, MAC address are only available in two other encoders from the market (Zend and ION) but at much greater price, while Vurtual Host is probably exclusive to Nu-coder. At the same time, there was no option to limit the number of the concurrent users, that we think would be helpful.

Encoding the project and running encoded PHP scripts

Once we specified the encoding options and generated the license file we went ahead with encoding of our sample PHP application by selecting Encode Project(s) from a popup menu:


PHP Encode Menu
(PHP Encode Menu - 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 substantial performance increase in terms of faster page loading times, etc.

When we run our encoded files the first time, we got the error message from our custom header - as expected, because we didn't install PhpExpress


PHP Encode No Loader
(PHP Encode No Loader - Click to Enlarge)


Once we installed PhpExpress (see the instructions here, it is pretty simple), which is the PHP Loader for Nu-Coder encoded scripts, we got the expected output in the browser.


PHP Encode Works
(PHP Encode Works - Click to Enlarge)


License Manager and Encoder would be incomplete without the ability to tell the user that the License is expired. Nu-Coder License Manager handles it with pe_handle_error(), which is the interface that you as a developer need to implement in the file not protected by the License.

PHP Encoder - In Conclusion

Nu-Coder 2.0 release provided PHP community with the ability to choose how to protect PHP applications from unauthorized use. Last time when we reviewed Nu-Coder our main complain was the lack of License Manager, which is made available in Nu-Coder. In our opinion this addition combined with robustness of both Encoder and License Manager, tight integration with PHP IDE and really aggressive pricing (at the time of writing of this review you can get Nu-Coder for as low as $87 if you buy or own PhpED, standalone Nu-Coder can be picked up for $149) makes Nu-Coder a serious contender for any PHP developer's encryption needs.

Still, there are few things we want to see implemented or improved:

  • Encoder itself would benefit from multiple levels of obfuscation. Currently Nu-Coder 2.0 provides encoding and base obfuscation
  • User Interface to the encoder from PhpED can be improved by making the link between keyword used for generation of the License and the keyword used in Protection tab more obvious - for example by using it as default and showing the Project's License keyword in bold, if there is more than one licenses generated.
  • Some parts of the User Interface are hard to understand - such as mask of the file to be excluded from license protection. Also, the scripts selection UI- e.g. error handler script - should have an option of selection of the files from the PhpED workspace or current PhpED Project.

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

Go back to Part 2 of Encoding PHP Files to Protect your PHP Application

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.