stinkypyper Posted September 16, 2008 Share Posted September 16, 2008 I have some text that I would like to obfuscate to help keep the bots away. I have tried using htmlentities() and htmlspecialcharacters() but they both do not work on letters and numbers. I want every character in a string, not just ones that have special meaning in HTML to be converted to the appropriate entity. Anyone help would be greatly appreciated. Cheers. Link to comment https://forums.phpfreaks.com/topic/124548-html-obfuscation-using-php/ Share on other sites More sharing options...
rarebit Posted September 16, 2008 Share Posted September 16, 2008 Hex: 0x7f.0x00.0x00.0x01 Octal: 0177.0000.0000.0001 Obviously these represent 127.0.0.1 You can encode urls into hex, octal, etc. However I don't think that it would stop bots. One way is to grep the agent to see if it's a known bot (or visited too many pages in too short a time) and then not print some 'top secret' information. Another way is to use javascript to decrypt or decode (your own code) some data to a dynamic area of your page. Link to comment https://forums.phpfreaks.com/topic/124548-html-obfuscation-using-php/#findComment-643242 Share on other sites More sharing options...
unkwntech Posted September 16, 2008 Share Posted September 16, 2008 Just use javascript, use document.write('<php echo $contentToHide; ?>') Link to comment https://forums.phpfreaks.com/topic/124548-html-obfuscation-using-php/#findComment-643246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.