NEW SUPPORT LINE (South Africa only): SMS your support request (FIRST WORD MUST BE SUPPORT) to 072 532 1530

Protect your PHP code by obfuscating it

Posted in PHP on 2012-07-15

Protect your PHP code by obfuscating it!

 

 

The ionCube PHP Encoder makes it easy to protect your PHP files from easy observation, theft and change. With optional licensing features built in, licensing your scripts to control which server your code runs on is easy too, and you can even give your files a time expiry!

Available in three versions, Basic, Pro and Cerberus, all versions offer bytecode PHP encoding plus optional encryption of non-PHP files. Pro and Cerberus also include the optional PHP licensing features for time expiry and restricting where code can be used, allowing licensing models to be effectively and easily implemented.

The PHP Encoder is available for Windows, Linux, FreeBSD and Intel OS X. All versions offer command line access for encoding and creating license files (Pro and Cerberus), which is ideal if you wish to automate processing. The Windows Encoder also includes an easy to use GUI, and the Windows Pro and Cerberus version includes a Linux based license generator for PHP scripts for FREE, which is great if you wish to encode on Windows and create license files from a Linux based web server for example.

Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and more.

Encoding BenefitsAs PHP scripts can be easily read, changed and run on any PHP enabled system, encoding PHP offers important benefits:

Product Developers: protect and license your code before distribution. Ideal for protecting evaluation copies, the low once only purchase cost can quickly deliver a significant return on investment from increased sales.

Website Designers: protect your creative work and a revenue stream from future script updates.

Enterprise Customers: successfully enforce internal change control policies by avoiding untracked software tweaks that may get lost on a site reinstall or server move.

Website Owners: hide sensitive data and protect scripts from unauthorised changes that may go unnoticed indefinitely and be a serious security and data protection risk.

Example of code

Here is a section of code from an index.php file

=========================================================================================================

START OF PHP CODE

=========================================================================================================

<?php
session_start();
include(“./includes/Functions.inc”);
include($_SERVER["DOCUMENT_ROOT"].”/includes/Variables.inc”);
?>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head><title><?php print GetTitleTag(“1″); ?></title>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta name=”description” content=”<?php print GetMetaDescription(“1″); ?>”>
<meta name=”keywords” content=”<?php print GetMetaKeywords(“1″); ?>”>

=========================================================================================================

END OF PHP CODE

=========================================================================================================

and here is the encoded code segment

=========================================================================================================

START OF PHP CODE

=========================================================================================================

<?php //003ac
if(!extension_loaded(‘ionCube Loader’)){$__oc=strtolower(substr(php_uname(),0,3));$__ln=’ioncube_loader_’.$__oc.’_’.substr(phpversion(),0,3).(($__oc==’win’)?’.dll’:’.so’);@dl($__ln);if(function_exists(‘_il_exec’)){return _il_exec();}$__ln=’/ioncube/’.$__ln;$__oid=$__id=realpath(ini_get(‘extension_dir’));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==’:'){$__id=str_replace(‘\\’,'/’,substr($__id,2));$__here=str_replace(‘\\’,'/’,substr($__here,2));}$__rd=str_repeat(‘/..’,substr_count($__id,’/')).$__here.’/';$__i=strlen($__rd);while($__i–){if($__rd[$__i]==’/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die(‘The file ‘.__FILE__.” is corrupted.\n”);}if(function_exists(‘_il_exec’)){return _il_exec();}echo(‘Site error: the file <b>’.__FILE__.’</b> requires the ionCube PHP Loader ‘.basename($__ln).’ to be installed by the site administrator.’);exit(199);

?>
4+oV57VUu30z8za7B6zr4sV2Cx2z8oGItODXXTboXYkTpB0jT1p+6ASGIRkQT5ujcsgFVWLV7rg1
fr17JxPlCTK+aVsqbjaZgMEn+I7VPEtB4N2mXDPTMRxtZCp5QQsHrngYFGQDEcv2mGVr4+O0iXVx
jUx8lUJ9/YhNRTpQHKZcyplCkUYQs6qMfWHGR1H8v1h5BdvSVUcCuyYBn4U0fGGOLGQWil2hDXh1
pe0U8QYNPykRDyivD/p2q/2rRSZ8hZEV3yL55roojBINMMQerm61Xkua6YfGdoICapac9sd3cIFI
+vLhGT4bYhYAAvqDSCcPXl/dy+1E3CB2RIr1LFD7UCoPPdYsSMH7wwf18IjIKFE/7Xg5m47pl2U3
GxZP6lKaXoWQ3LK6JQuwigN1eobfvrH1058s+w1WhsBCTCJqmhDgeIu3TzL+odxK/MM9oyva/gEX
ruX5DNdd28ouDWVJp0JNjVytRJL4jX8M1XpXAZYmf966toDAdW/Dms1AMWM9GK5d/rE/jxlHT9om
CqMaRb/5ljDrXFdoAcTFelL7CnkH73i5hC6jTzTtlyS1UwILHao6mGRBwya5dJgOO5iXImA1pDY7
H6n6HYSZE8BPg08JgotrnIpf0atZ5hdtK7Uy6/zTD3cWlN2HJ2Fn+7mWY1N6/HXJRZl7GPv3BI8e
alaIokyeT9Qq92dhY48/vPbj5n1fuGnfSDEzh315iWLHMz7YnIs/kRpBB5A8dEYJT4BTkY5SjfzY
mb65CixXBVVE3q7dkckwYmbwphe6+nKj2WbdfiC6s44rcNF4kpaLswB3Y2dM5TKZpASHs88ID7BE

=========================================================================================================

END OF PHP CODE

=========================================================================================================

Best of all, if someone tries to change your code, even the comments sections, the code won’t run. We use it on our freeware easyCMSlite, free, east content management project

To find out more about PHP code encryption click the link. There is a demo version that you can download!

 

Comments

Add your comment

Display Name:
Web Address:
Email Address: (not displayed)

Comment

SSL Certificate Authority Paypal Verified We accept PayPal

 
 
  © Free, easy content management system
HOME | WEB DEVELOPMENT | WEB HOSTING | SOFTWARE | RESELLERS | SEO | GENERAL | AFFILIATES | RESELLER 50GB | RESELLER 100GB | RESELLER 150GB | RESELLER 200GB | VPS