• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net

No View Source Script

Timilon

New Member
is there a script in any language that can keep people from viewing your source, not a no right click script but 1 that completely hides it maybe like the one at sinz.net <-- may contain porn but in the view source it says

<!--- Begin IP Tracker Logging ---


IP Tracker Copyright 2001-2002 by webmaster@sinz.net

STEALING html, codes, graphics, etc. is not cool with me.

All violaters will be prosecuted to the full extent of the law.

Your IP address has been recorded and sent to me.


--- End IP Tracker Logging --->
 
uh, you can view their source code fine. just scroll down a bit, all they did was hold down the enter key for a few seconds and skip a bunch of lines.

by the way, keeping people from viewing your source html is impossible.
 
No right click - in I.e menu and on webpage(s)

STEP 1 - NO RIGHT CLICK ON THE I.E MENU (I.E 6 OR ABOVE)


Open Notepad, insert this code into it:

menuItems = new Array();
menuItemNum = 0;

function addMenuItem(text, url, img){
if(img) menuItems[menuItemNum] = new Array(text, url, img);
else if(text) menuItems[menuItemNum] = new Array(text, url);
else menuItems[menuItemNum] = new Array();
menuItemNum++;
}

menuWidth = 1; //menu width
menuHeight = 1; //menu height
menuDelay = 50; //delay before menu appears
menuSpeed = 8; //speed which menu appears (lower=faster)
menuOffset = 2; //offset of menu from mouse pointer


addMenuItem("","","");
addMenuItem("","","");
addMenuItem();
addMenuItem("","","");

//--------------------------------------------------------------------------------------------

if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 5.5)
isIe = 1;
else
isIe = 0;

if(isIe){
menuContent = '<tr height="1"><td style="background:threedlightshadow" colspan="4"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight" colspan="2"></td><td style="background:threeddarkshadow"></td></tr><tr height="10"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:hand;">';
for(m=0;m<menuItems.length;m++){
if(menuItems[m][0] && menuItems[m][2])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else if(menuItems[m][0])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else
menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>';
}
menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedshadow" colspan="3"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threeddarkshadow" colspan="5"></td></tr></table>';

menuPopup = window.createPopup();
menuPopup.document.body.innerHTML = menuContent;
}

function showMenu(){
menuXPos = event.clientX + menuOffset;
menuYPos = event.clientY + menuOffset;

menuXIncrement = menuWidth / menuSpeed;
menuYIncrement = menuHeight / menuSpeed;

menuTimer = setTimeout("openMenu(0,0)", menuDelay);

return false;
}

function openMenu(height, width){
iHeight = height;
iWidth = width;

menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);

if(iHeight < menuHeight)
menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
else
clearTimeout(menuTimer);
}

if(isIe) document.oncontextmenu = showMenu;


//---------------------------------------------------------

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}




then save that as NORIGHTCLICK.js, and upload it to your webspace, in each webpage that you have, put this code in between the head tags:

<script src="NORIGHTCLICK.js" language="Javascript"></script>


.....and once the user has tried to right click the screen and nothing comes up, they will try getting the source from the view source in the menu and it won't work. Any problems, contact me viz my site: http://www.vizzo.org/ .
 
No right click - on webpage(s)

STEP 2 - NO RIGHT CLICK ON YOUR PAGE


(DO NOT INCLUDE THIS WITH THE CODE ABOVE, OR IT WILL NOT WORK AND PEOPLE WILL BE EASILY STEALING THINGS FROM YOUR SOURCE CODE!)


Put this in the head tags:-


<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
//-->
</script>




Any problems - E-mail me via: www.vizzo.org/
 
OZzYUK is the script suppose to disable view source in the menu? i cant right click but im still able to view source from top menu.
 
like i said, it's impossible to keep visitors from viewing your html. nothing to worry about anyhow, it's just html man. if you don't want people looking at your source code, don't upload a website.
 
reply to last post

a very good and vaild point there, but hoever, if some of us do have websites we would like to keep all our hard work away from people who might want to copy it.
 
Like was already mentioned, you can't totally hide your source code from anybody that really wants to view it.

In order for you to be ale to see a web page, your browser has to be able to read the source, sure you can use a few different things to make it a little more difficult for people but you can't hide the source.

OZzYUK i can view the source of your site just fine :)
 
Haha...this makes me think my script I made that puts a bit of JS code on a site, and when copied and left in the source, will tell the original site creator, is a good idea.

Unless...okay, here is a way to completely hide your html source. Create the page, and don't upload it. Instead, browse it locally, and take a screen capture of the site. Then just upload the image!
 
yeah, make your whole website's layout and content one big image map.

wait a sec, you'll still need a no-view-source javascript anyhow to hide the coordinates you've mapped and the <img> tag you've created! well i guess that won't work.
 
Last edited:
Originally posted by keith
yeah, make your whole website's layout and content one big image map.

wait a sec, you'll still need a no-view-source javascript anyhow to hide the coordinates you've mapped and the <img> tag you've created! well i guess that won't work.

Yes, but on the plus side, no one would want to copy it!
 
there is a script that scrambles the html of your site when it is viewed but it will display it the way you want it I think I saw it in hotscripts.com or download.com anways just search for "html scrambler" or sumtin like that and am sure you'll find one. Oh but I never used this before so I don't know if it works or not.
 
Back
Top