chanfuterboy Posted August 11, 2009 Share Posted August 11, 2009 Hi, Is there a php script/code that dis able source in IE? Quote Link to comment https://forums.phpfreaks.com/topic/169801-dis-able-source-in-ie/ Share on other sites More sharing options...
wildteen88 Posted August 11, 2009 Share Posted August 11, 2009 Do you mean view source? You cant do this with PHP. You have to use a client side language such as Javascript. However there is no point in disabling right click > view source as it very easy to work around and doesn't add any protection. You'll just end up irritating your visitors. Quote Link to comment https://forums.phpfreaks.com/topic/169801-dis-able-source-in-ie/#findComment-895791 Share on other sites More sharing options...
alexdemers Posted August 11, 2009 Share Posted August 11, 2009 The closes thing you can do is insert thousands of blank lines before starting to output your page. (stupid) visitors might say that the source is not available. Of course this method won't work with addons like Firebug. Or just play with whitespace of your HTML source. Your PHP code is already hidden. If it's for JavaScript, minimize your code. Quote Link to comment https://forums.phpfreaks.com/topic/169801-dis-able-source-in-ie/#findComment-895861 Share on other sites More sharing options...
WolfRage Posted August 11, 2009 Share Posted August 11, 2009 Don't do it. Don't waste your time. Simple as that. Legitimate users do not give a crap about your source code. But alot of the time they may want to open one of your links in a new window or a new tab. But you decided to disable that option! Now they are pissed as I would be and I leave your site and say screw them any ways. On top of which users that want to see your code know that you can always choose page->veiw Source. Also what if I use Firefox, Chorme, Opera, Safari, or a screen reader, you can not stop me. I have so many ways of obtianing the source that you can not stop me, except by not sending me your page in the first place. Don't forget I can also disable javascript or even save your page to my desktop and open it with a text editor. If you are going to use javascript to disable the right click just don't send me your page because I do not want the annoyance and neither do 98% of your normal users! Quote Link to comment https://forums.phpfreaks.com/topic/169801-dis-able-source-in-ie/#findComment-895925 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.