PHP source code encoding with ionCube PHP Encoder
The ionCube PHP Encoder makes it easy to protect your PHP 4 & 5 source code, including sources using the PHP 5.3 language, from easy observation, theft and change. Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and others.
Evaluation version download: http://www.ioncube.com/encoder_eval_download.php
Encoding PHP source code:-
- Download ionCube PHP Encoder
- Install the software
- Run the software
- Provide your source and traget directory for the PHP code to be encoded.
- If you are encoding php file, then give the PHP Encoding extension as ‘php’.
- Execute the program.
- The encoded file will be stored in the specified target directory.
Running the Encoded PHP file:-
For this, you need to have “ionCube Loader“. ionCube Loader is a PHP extension that works to decode PHP scripts previously encoded by the ionCube PHP Encoder package.
Download latest version of ionCube Loader from here: http://www.ioncube.com/loaders.php
Install the ionCube Loader PHP extension. The installation instruction is given over here: http://www.ioncube.com/loader_installation.php
ionCube Loader Installation instruction for Windows
I am using Windows OS, WAMP server and PHP version 5.2.6.
- Download zip file from http://www.ioncube.com/loaders.php from the row where OS/Platform is Windows VC9 (x86)
In this page, you will see different package for different OS. For windows only, there are four versions present (Windows VC6 (x86), Windows VC6 (Non-TS) (x86), Windows VC9 (x86), and Windows VC9 (Non-TS) (x86))
Non-TS means Non Thread Safe.
The difference between VC6 and VC9 for Windows OS is given below:-
VC6 Versions are compiled with the legacy Visual Studio 6 compiler.
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability.
- Extract the zip file
- Copy loader-wizard.php to your root directory. In my case it is C:\wamp\www\
- My PHP version is 5.2.6. So, I will copy ioncube_loader_win_5.2.dll to C:\wamp\bin\php\ioncube\. If you are using PHP version 5.1 then you need to copy the ioncube_loader_win_5.1.dll file. It’s the similar case for PHP 5.3. The folder path is not compulsory to be: C:\wamp\bin\php\ioncube\. You can keep it wherever you like.
- Open php.ini file and write the following line:
zend_extension_ts = C:\wamp\bin\php\ioncube\ioncube_loader_win_5.2.dll.
Remember that in my case, I have stored ioncube_loader_win_5.2.dll file in C:\wamp\bin\php\ioncube\ path.
- Restart apache.
Now, you can browse the encoded php files.
Hope this helps. Thanks.