pk-fr / yakpro-po

YAK Pro - Php Obfuscator
http://www.php-obfuscator.com
Other
1.24k stars 350 forks source link

Feature request: allow files with html + php #116

Open hoit opened 1 year ago

hoit commented 1 year ago

Yak-pro does not work on .php files which contains html code.

For instance, if you create some contract classes and call it in view pages (in sense of MVC model), it means that you are not able to obfuscate contract (event if the code does not contain any intelligence...) otherwise the view will not works as it contains html code and the functions are not renamed in it.

Could it be possible to manage also the php code available between html sources ?

        <div id="header">
            <a class="home" href="<?= $header->getHomeUrl() ?>">Home</a>
        </div>

        <div id="header-links">
            <?php
            if($header->isConnected())
            {
            ?>
            <ul>
                <li><a href="<?= $header->getProjectsUrl() ?>">Projects</a></li>
            </ul>

            <?php
            }
            ?>
        </div>
X25guru commented 11 months ago

I've never had a problem with this. You can tell it not to obfuscate things in the conf. This would probably be class variables.

If I need to obfuscate a utility I create one big php file by combining the sources; (in no includes or libs) and then you can obfuscate the entire thing. With externals you'll have to not obfuscate external variables.