Loading...
 
Gmail / Facebook Style Chat Application


Posted: Sunday 30th of September 2012

Encrypt and Secure your PHP Applications with PHP



This tool will encrypt any PHP script using Base 64 encoding technique to secure your work or application.
To get started, Please copy and paste your PHP script in the text area space provided at the demonstration area.
I strongly advice you to start your code with the openning of PHP ("<?php") and end it with the closing of PHP ("?>"), to avoid any encoding errors.
After your code has been encrypted, copy it and paste on your page to see the encypted code in action.




Download Live Demo


Example PHP script to encrypt and its encrypted result are shown below:

Code:
<?php
$user = "Boy";
if($user == "Boy")

{

      echo 'User is a boy<br />';

}
else

{

      echo 'User is a girl<br />';

}

    //RESULT
eval(gzinflate(base64_decode('41IpLU4tUrBVUHLKr1Sy5uXKTNOACkHFNBWqFVKTM/IV1ENBwpnFCokKSfmV6tYKtbxcqTnFqVjk0zOLciAKAA==')));
?>



Section of code that does the encryption:
<?php
//Check if the form has been submitted
if ($_POST["encrypt_this_code_now_by_vasPLUS_Programming_Blog"] == "yes")
{
      if($_POST['code_to_encrypt'] == "")
      {
            echo "Please copy and paste your php source code that you wish to encrypt in the text area space provided below to proceed.";
      }
      else
      {
            //Form has been submitted
            $_s_encrypt_this_code=$_POST['code_to_encrypt'];
            $_s_encrypt_this_code=stripslashes($_s_encrypt_this_code);

            //Remove space
            $_s_encrypt_this_code=trim($_s_encrypt_this_code);

            //Count string
            $_s_countString=strlen($_s_encrypt_this_code);
            $_s_lastString=$_s_countString-4;
            $_s_restString = substr($_s_encrypt_this_code, 2, $_s_lastString);
            $_s_codeDisplay= substr($_s_restString, 4);
            $_s_strings= $_s_codeDisplay;
            $_s_codeCompression = gzdeflate($_s_strings, 9);
            $_s_encodeString = base64_encode($_s_codeCompression);
            $_s_stringEncoded = "&lt;"."&#63;"."php".'
'.'eval(gzinflate(base64_decode('.'&#39;'.$_s_encodeString.'&#39;'.')));'.'
'.'?'.'>'
;

      }
}
?>



That's it guys...


Views Today: 0
Total Views: 1181

Comments
0
OUR OBJECTIVE

Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.

OUR MISSION

We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.

Copyright © 2011 - 2024 | All Rights Reserved