Solved

Lock/Hide Page's Source Code

Posted on 2009-07-09
4
815 Views
Last Modified: 2012-05-07
Hello,

I'm looking for something that can lock source code of pages of my website. Just like whenever they press ctrl+u or click view page source in browser. They do not see actual source code of the page.

Is it possible?
0
Comment
Question by:Andy1988
4 Comments
 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 24813559
0
 
LVL 12

Accepted Solution

by:
jet-black earned 500 total points
ID: 24813619
It is not possible block users to view your page' HTML source code.
However you can make harder to understand your code with Javascript.

You can try these:
http://www.ioncube.com/html_encoder.php
http://scriptasylum.com/tutorials/encdec/encode-decode.html

However, when you make that, search engines will not be able to index your page.
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 24813660
try this
<head>
<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
      var message = "function disabled";
      function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){       alert(message); return false; }
      if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {       alert(message);       return false; } }
      document.onmousedown = rtclickcheck;
</SCRIPT>

</HEAD>
0
 
LVL 4

Author Closing Comment

by:Andy1988
ID: 31601583
I tried the IonCube HTML Encoder and it worked.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question