Gmail / Facebook Style Chat Application
Details Live Demo Download


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...



Comments
0

 

Announcement x
Dear Users and Clients,

This is to inform you that we have recently updated our website generally.

If you experience any problem viewing any part of this website or if you notice that any of our scripts or tutorials are not functioning properly as should be, please click on the Contact Link at the top of this page to report the issue to us.

Our priority is to give you the best of service!


Thank You,
The Vasplus Team

Announcement