Dizzee15 Posted April 29, 2009 Share Posted April 29, 2009 I found a web page that I can't get it's source code, if I click a right mouse button it says that It's forbidden to do it. I want that my page would have same thing, but it's WAP site not WEB. So is there any way to protect my WAP site ? Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/ Share on other sites More sharing options...
premiso Posted April 29, 2009 Share Posted April 29, 2009 Yes, with Javascript you can code in a function to disable the "right" click. However it is easily by passed by turning off Javascript or a few tricks like holding the right mouse button then when you left click ok hold the right mouse button again and move it on the page and viola you get the menu. Or just View -> Source. Anyhow someone in this forum should be able to help you, but you can google, "Javascript disable right click" and find an answer quicker. Technically, I would not consider HTML source code. That is more like a template/median used to display data. Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821798 Share on other sites More sharing options...
Dizzee15 Posted April 29, 2009 Author Share Posted April 29, 2009 Then I better don't want protection like this. How to absolutely protect my WAP site ? Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821800 Share on other sites More sharing options...
premiso Posted April 29, 2009 Share Posted April 29, 2009 Then I better don't want protection like this. How to absolutely protect my WAP site ? You cannot protect "html" unless you make the client install software of yours to view the website. Then it might be possible, however they could still potentially get the code. Just out of curiosity, why is your HTML output so important to protect? You could take a page out of google's book and use AJAX to display the full page, but this also requires javascript or the user cannot see the page. But if you go into gmail and view the source all you see is Javascript, nothing more. Other than doing that (which with a DOM viewer you may still be able to get the HTML, I do not know as I never tried) yea. Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821803 Share on other sites More sharing options...
Dizzee15 Posted April 29, 2009 Author Share Posted April 29, 2009 It's not HTML page, it's PHP and WML in one. Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821809 Share on other sites More sharing options...
PFMaBiSmAd Posted April 29, 2009 Share Posted April 29, 2009 Any content that you publish and output can be copied. The only way to protect it is to not publish it. Kind of tired of seeing this question asked :'( Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821814 Share on other sites More sharing options...
ignace Posted April 29, 2009 Share Posted April 29, 2009 I wouldn't use scripts like right mouse disable especially not if you are going to output text as you immediatly are implying that we are thiefs. Besides the web is build to easily access information coop with it! Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821842 Share on other sites More sharing options...
JonnoTheDev Posted April 29, 2009 Share Posted April 29, 2009 It's not HTML page, it's PHP and WML in one First of all you cannot see any php source code as it is parsed server side and displayed to the client as HTML or whatever. Secondly why would you ever need to stop a client from viewing the HTML / WAP or whatever source code in their browser? Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-821868 Share on other sites More sharing options...
Asheeown Posted April 30, 2009 Share Posted April 30, 2009 If you're trying to protect the full print out of java in the source code you can look into an external link for your script. You can put it in a separate js file and deny viewing permissions but allow execute permissions for your servers web service. Quote Link to comment https://forums.phpfreaks.com/topic/156118-is-there-any-way-to-protect-source-code/#findComment-822334 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.