kudashevs/html-obfuscator

A PHP implementation of an HTML obfuscator.

Maintainers

Package info

github.com/kudashevs/html-obfuscator

pkg:composer/kudashevs/html-obfuscator

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-04 14:08 UTC

This package is auto-updated.

Last update: 2026-08-04 15:16:54 UTC


README

Latest Version on Packagist Run Tests License MIT

A PHP implementation of an HTML obfuscator. The obfuscator encodes a provided text into different numeric codes to mask content from simple automated scrapers while the content keeps rendering normally in a browser.

Installation

You can install the package via composer:

composer require kudashevs/html-obfuscator

Usage

The obfuscator can be used both statically and dynamically. The only limitation of the dynamic approach is that it is not possible to provide custom settings during the instantiation. However, in the vast majority of use cases, these settings are not needed. I would recommend using the dynamic approach because it is generally more flexible.

use Kudashevs\HtmlObfuscator\Obfuscator;

$text = 'the answer for 3 + 2 is';

// static invocation
$obfuscated = Obfuscator::obfuscate($text);

// dynamic invocation
$obfuscator = new Obfuscator();
$obfuscated = $obfuscator->obfuscate($text);

print_r($obfuscated);
// both cases will result into
the answer for 3 + 2 is

Testing

composer test

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Note: Please make sure to update tests as appropriate.

License

The MIT License (MIT). Please see the License file for more information.