Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pH-7/Obfuscator-Class

:man_technologist: Simple and effective Obfuscator PHP class (this is not a stupid base64 encoding script, but a real and effective obfuscation script)
https://github.com/pH-7/Obfuscator-Class

code-obfuscator encode encryption hide-code obfuscate obfuscate-code obfuscation obfuscator php php-encoder php-encryption php-obfuscation php-obfuscator

Last synced: 3 months ago
JSON representation

:man_technologist: Simple and effective Obfuscator PHP class (this is not a stupid base64 encoding script, but a real and effective obfuscation script)

Awesome Lists containing this project

README

        

# 🔐 PHP Obfuscator

Simple, easy-to-use and effective Obfuscator PHP class.

**Not just a stupid `base64 encoding` script, but a real and effective obfuscation script.**

Ideal to obfuscate some critical pieces of your software such as licensing verification functions.

## 👓 Overview

If you want to keep your open source code private, but working on all Web hosting, this **Obfuscator** class is THE obfuscator you need!

Not easily readable by developers (unless they are ready to spend lot of time). It will definitely discourage them! :smiley:

## 📓 Usage

### Take out ``

If you specify code to be obfuscated with ` This is my PHP code, can be class class, interface, trait, etc. in PHP 5, 7, 7.2, 7.4 and higher.

If you open the file, you will see that your code is totally hidden (obfuscated).

### Example 2

```php

';

if ($hour < 10) {
echo 'Have a good morning!';
} elseif ($hour < 20) {
echo 'Have a good day!';
} else {
echo 'Have a good night! zZz z';
}
DATA;

$sObfusationData = new Obfuscator($sData, 'Give a name to the piece of code you want to obfuscate');
file_put_contents('obfuscated_code.php', ''), '', $sData); // We strip the open/close PHP tags
$sObfusationData = new Obfuscator($sData, 'Class/Code NAME');
file_put_contents($filename . '_obfuscated.php', '
[author-url]: https://ph7.me
[license-url]: https://opensource.org/licenses/MIT
[twitter-image]: https://img.shields.io/twitter/url/https/shields.io.svg?style=social
[twitter-url]: https://twitter.com/phenrysay