Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes this way protect my PHP Source?
    text
    copied!<p><em>(sorry for my bad english!)</em></p> <p>To protect my php Source code, I want to encrypt only one file with ioncube(for example <em>function.php</em>), And then I want to call the encrypted file in other php files! (other php files will be encrypted with mcrypt function.)</p> <p>Please see the example:</p> <p>function.php</p> <pre><code>&lt;?php // Only This file will be encrypted by the ionCube function simple_encrypt($text) { $salt='whatever_you_want'; return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); } function simple_decrypt($text) { $salt='whatever_you_want'; return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } function decrypt_and_run($text) { eval (simple_decrypt($text)); } ?&gt; </code></pre> <p>script1.php</p> <pre><code>&lt;?php include "function.php"; decrypt_and_run("Mz/PKIZDmo1/VW4BNXX2d+XQD2dx1aB9gnBj1hbGzVM="); // Mz/PKIZDmo1/VW4BNXX2d+XQD2dx1aB9gnBj1hbGzVM= ~ echo "hello world1!"; ?&gt; </code></pre> <p>script2.php</p> <pre><code>&lt;?php include "function.php"; decrypt_and_run("oD3R8wPlUujQEkJfyPvTJOKek7MjzAuGBn+PfyssjZ4="); // oD3R8wPlUujQEkJfyPvTJOKek7MjzAuGBn+PfyssjZ4= ~ echo "hello world2!"; ?&gt; </code></pre> <p>script3.php</p> <pre><code>&lt;?php include "function.php"; decrypt_and_run("vMef6WP9xm1nmsAYMSgxFRY2nhBPTNWog3rLOGhb69Y="); // vMef6WP9xm1nmsAYMSgxFRY2nhBPTNWog3rLOGhb69Y= ~ echo "hello world3!"; ?&gt; </code></pre> <p><strong>1) Does this way fully protect all of my PHP Source? (function.php, script1.php, script2.php, script3.php,...)</strong></p> <p><strong>2) Does eval function works in ioncube or Zend Guard?</strong></p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload