Question - HTML code encryption with php...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Question - HTML code encryption with php...

Post by tecktalkcm0391 »

Is their anyway to make PHP take the HTML from its page and convert it into something like you can do at: http://www.dynamicdrive.com/dynamicindex9/encrypter.htm with your HTML. If this could happen, all our source codes would be protected.

Any ideas.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Yes - since all it's doing is encoding the special characters and running it through JavaScript. Wouldn't bother doing it myself though - is your HTML really that special?

Mac
User avatar
aerodromoi
Forum Contributor
Posts: 230
Joined: Sun May 07, 2006 5:21 am

Re: Question - HTML code encryption with php...

Post by aerodromoi »

tecktalkcm0391 wrote:Is their anyway to make PHP take the HTML from its page and convert it into something like you can do at: http://www.dynamicdrive.com/dynamicindex9/encrypter.htm with your HTML. If this could happen, all our source codes would be protected.

Any ideas.
You could also convert your source into base64 and decode it via javascript.
However, not all users have javascript enabled in their browsers.
Furthermore, encoding special chars or using base64 is next to worthless as you can easily decode it.

aerodromoi
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

HTML source code cannot be protected, period. You can try obfuscating it though (which may deter casual thieves)
Post Reply