简体   繁体   中英

Any Simple obfuscator of HTML code generated by PHP?

I used ioncube to successfully hide the source before. Unfortunately, it stopped working recently after modifying some other unrelated feature.

All I need is to scramble two lines of code which display the URL of a secret location to the end user.

I understand that it is not a good practice and all, but I need to do it so that someone I know can have some peace of mind.

Is there any simple way to deter a novice user from understanding the URL?

This should be enough for a notice user to not find / understand the URL in a source code:

$url = 'http://www.example.com';

function to_entity($a) {
    return '&#x' . dechex(ord($a)) . ';';
}
$url = implode('', array_map('to_entity', str_split($url))); // encodes this url as http:…

// you can use it directly in HTML:
<a href="$url">

那里有很多javascript链接混淆脚本,即使对于最不熟练的人来说,破解它也是微不足道的,但是它可以避免白痴。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM