Have any body tried to deactivate the browsers Menu.
The FILE, SAVE AS,
this would stop visitors from harvetsing Code.
a quick check at
http://www.google.com/search?sourceid=navclient&q=javascript+right+mouse+disable
came up with
http://www.dynamicdrive.com/dynamicindex9/noright.htm
http://www.codelifter.com/main/javascript/norightclick1.html
and these seem to do what you need.
By doing this you're only deactivating the mouse's right click, you're not deactivating the FILE menu at all.
I don't think this is possible with a script language except MAYBE(and it's a big maybe) with VBScript.
Regards,
You can't stop someone from viewing HTML code. Your PHP code is safe (probably, but that's a separate issue) since it is on the server, but the HTML is not safe since it has been transfered client side.
Use javascript to remove my mouse, and I'll disable javascript. Or look in my cache for the file and open it with notepad.
Hello!
A good, bad and ugly way that I have found to hide your code is to generate your whole html document with php and store it all in one var(ie $var).
then you can say:
NewWin=window.open("","",""); NewWin.document.body.innerHTML='<?=$var?>'; window.close();
And even if you view the source of the new page there should only be "<html></html>"
Not that I like to hide my own code... 🙂
bye!
Hello,
No Right click is not what I was looking for.
I use it once a site is complete.
What I have a problem with is By using File Save As,
I can save any web code to html.
I can save PHP, HTML, CGI and PL as an HTML file.
As several people have already said, you cannot harvest php code using the save as command. The user only sees the html output of the php script.
As for hiding html, even if you could disable the save as for some browsers, there are other tools (wget and telnet) which can be used to view the html. It's almost impossible to disable them.
Thanks All.
I have noticed that with some POPUP's the Complete menu is gone.
That trigered the thought.