Jump to content


Photo

obfuscate html with php function?


  • Please log in to reply
4 replies to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 11 October 2006 - 11:37 PM

Basically, I know there are tons of free things where you put in your html and it encodes it with javascript so it still works but makes it ridiculously difficult for others to edit. Well...I need this to work with a php function, so I can do encodehtml($input); and have it return the input encoded.

Any help? Thanks!

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 12 October 2006 - 02:15 AM

This is all over the PHP manuel page on base64_encode, but the location it was hosted on (through dyndns.org apparently) has mysteriously vanished. The source to that file is attached -- hope it can help.

PS> base64_encode manuel page: http://us3.php.net/base64_encode

[attachment deleted by admin]

#3 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 12 October 2006 - 02:17 AM

Encoding your html so a browser can't understand it is pointless. A browser can't understand it!

#4 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 12 October 2006 - 02:24 AM

I didn't think of that he was trying to obfuscate HTML -- but now that I read it a few more times it does sound that way.

So, are you trying to obfuscate HTML that is presented to the browser or PHP that remains on the server? Please clarify.

#5 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 12 October 2006 - 02:28 AM

So, are you trying to obfuscate HTML that is presented to the browser or PHP that remains on the server?


There is no point obfuscating php on the server either, php needs to be interpreted. Of course there are solutions available, but they are applications that need to be installed on the server.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users