Jump to content
MakeWebGames

question...


Nicholas

Recommended Posts

im wondering does anyone know how to stop people from going on say going on a game, and right clicking the mouse and clicking View Source, to get my coding?

does anyone know how to make it so if you click on View Source it wont do nothing. it wont pop up a like notepad thing with the information crap?

Link to comment
Share on other sites

Re: question...

actually you can steal HTML / CSS / Images and most annoying JS. But not PHP cannot be taken like that.

You may however use tricks to make it more difficult to get like using JS to render the HTML or such however it will never be completely safe as the rendering NEED to be on the client side.

Link to comment
Share on other sites

Re: question...

A few tips.

- Leave loads of white space at the top so when the person tries to view source it looks empty.

- Make it hard for the thief, a 1 line website is tricky :-D

- Use apache to show different images or to not allow the image directory to be viewed.

Link to comment
Share on other sites

Re: question...

I don't see the use of all this, if someone really wants to see what your HTML content looks like, they will eventually get it no matter how hard you try to obscure the results.

I leave all my HTML content plain, like it is. There is really no use trying to hide the fact that it is, indeed, just markup or an image.

Take for instance Myspace, they try so hard so that no-one can download the artists albums, but wiht no avail. Recently they tried to change the flash player, but the techies figured it out before, anything that is transmitted to the client, can be captured.

Link to comment
Share on other sites

Re: question...

i have one i was testing with but it does not really help much cos its so easy to view source with out right click put it after the php close tag not sure were i got it from but it was free off a site so enjoy

 

<SCRIPT language=JavaScript>

var msg='Your msg here';


function disableIE() {
if (document.all) {alert(msg);return false;}

}


function disableNS(e) {

if (document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {alert(msg);return false;}
  }
}


if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
} else {
  document.onmouseup=disableNS;document.oncontextmenu=disableIE;

}


document.oncontextmenu=new Function('alert(msg);return false')


</SCRIPT>

 

edit - first posted here http://criminalexistence.com/ceforums/i ... ic=27917.0

Link to comment
Share on other sites

Re: question...

You could use this:

http://www.voormedia.com/en/tools/html- ... ambler.php

Which basically produce a JS containing your HTML which is then somehow encoded. It makes it harder (but certainly not impossible) for the "html hackers" to read your code.

However, honestly, I would not care much to hide my HTML. I don't think that what I did in HTML was sooo smart that it would need to be completely hided. Personally I find more annoying that my JS cannot be compiled in some sort as this took me a lot of time to create and as my game is heavy on JS, of course it's a good chunk of the game itself. The good side is that even if you take ALL my JS code, you would still miss the server side counter parts, and without them you do nothing. I believe that in your case it's the same for your HTML.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...