Heritage1 Posted June 8, 2016 Report Share Posted June 8, 2016 I've finished a little code snippet for everyone, I was prompted to create this in regards to a particular individual that posted someone else's PHPVMS Skin. Well, the only way this person got this, was either through Fire Fox FireBug plugin, or just plain hacked it. ( the code source that is.) Easy to do now a days, so here, this is for Everyone, and is really simple, short and to the point. This will Protect against a right click to view the page source, if you put this into the ---> layout.php page, and/or the , frontpage_main.php "Anywhere", and of course this can be used anywhere you want. And it IS HTML compliant !! Period. php,htm, html, xml, and xhtml. Bottom line. Photos, YOUR HARD WORK, can't get skyped right out of the gate. It works for us, hope ya all can put it to good use. Thanks, Jim "Jungle" copy and paste this into the Head of the layout.php of the Skin you are using for phpvms. Again, it can be put all over the place if so Desired, however, usually the layout.php file is the source of your site, and skin setup you have created. <!--protect site script , start code--> <script language=Javascript> var message="Copyright All Rights Reserved!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script> <!--end protect script--> Feel free to visit any of my sites, working demos at ; http://heritage-va.net/hva and as usual, I will be MORE THEN HAPPY to answer you guys with questions. Give me time though, I am 100% disabled, to answer, sorry, (war vet). But I will answer as quick as possible. May God Speed, and see ya all in duh Air ! Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted June 8, 2016 Moderators Report Share Posted June 8, 2016 Thank you for sharing. Just my two cents. It's impossible to hide your HTML source code. If the browser can read it, which it needs to be able to render a webpage, then so can a user. Of course, this is a basic way to strict users who don't know what to do. If someone knows, he will be able to access your source code without anything special effort. 2 Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted June 8, 2016 Members Report Share Posted June 8, 2016 Have a look at this http://www.htmlgoodies.com/beyond/article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-Code.htm 3 Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted June 8, 2016 Moderators Report Share Posted June 8, 2016 What about F12? There is no way of protecting your css because the browser needs that information to be accessible. Where as your code no one can see anyway its just the html really. 1 Quote Link to comment Share on other sites More sharing options...
web541 Posted June 8, 2016 Report Share Posted June 8, 2016 (edited) Basically, you cannot prevent someone from accessing your source code from the front end. But if you need to protect your files from the back end (server side), try a .htaccess file like this http://forum.phpvms....directories-r35 Edited June 8, 2016 by web541 Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted June 9, 2016 Author Report Share Posted June 9, 2016 Yeppers, Makes total sense, thanks guys, didn't even think of that. LOL, I'm bad. I see that now, well, for those who can't do what we do anyway, Guess it was the thought that counted. LOL, You are right, tried that several different ways, was difficult at first but figured it out. But then again, As you guys said, for someone who really doesn't understand it. Jimbo Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted November 1, 2016 Report Share Posted November 1, 2016 I just made sure to drop a index.html page in every file that I could. That way no directories came up so people could download my files. if they are going to steal code, then they can work hard at it and right click and copy and all that. I'm not just going to let them download my files. Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted December 8, 2016 Author Report Share Posted December 8, 2016 Yep, Tried everything. However, I did break down and actually purchase a password locker software package which encrypts hard core. And has the features of backup along with different encryption methods of course, worth every single penny, I'm now using it faithfully for private areas in phpvms. I'm amazed at how easy it really is to view page sources, hence the purchase. It was worth a shot LOL, I tried. Thanks guys. Jim Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted December 8, 2016 Members Report Share Posted December 8, 2016 can you post a protected website ? i am curious of how it is shown Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.