Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/pH-7/Obfuscator-Class
- Owner: pH-7
- License: mit
- Created: 2016-08-27T22:50:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T09:08:04.000Z (over 3 years ago)
- Last Synced: 2024-07-17T23:35:56.727Z (4 months ago)
- Topics: code-obfuscator, encode, encryption, hide-code, obfuscate, obfuscate-code, obfuscation, obfuscator, php, php-encoder, php-encryption, php-obfuscation, php-obfuscator
- Language: PHP
- Homepage: http://github.com/pH-7/Obfuscator-Class
- Size: 50.8 KB
- Stars: 358
- Watchers: 24
- Forks: 143
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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