Forum Moderators: coopster

Message Too Old, No Replies

Hide the view source

hide the code in PHP

         

fast4u

7:04 pm on Jan 19, 2007 (gmt 0)

10+ Year Member



Hello,

Another question, is there a way to write a code that way that when someone clicks view source, all they are going to see is black window, without anything in there?

thank you,
Togrul

mcavic

7:17 pm on Jan 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The HTML source is always available to the Web browser. I don't know of any way to disable the View Source button, but even if there was a way, someone could use File->Save As, or a different browser without the restriction.

But the PHP source should always be hidden.

topr8

7:18 pm on Jan 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



well no-one can see your php code anyway only the resultant html.

if you want to hide the html you can't however a good way to hide it from most people is to have the first 200 lines of the page blank, that way when the user views source they will see nothing unless they scroll down, most people won't scroll down.

... final point. if you need to ask how to hide your code do you really think it is so good someone will want to steal it from you?

fast4u

7:25 pm on Jan 19, 2007 (gmt 0)

10+ Year Member



topr8,

true :)

mcavic,

got you

Thank you guys