by seandisanti » Mon Oct 15, 2012 11:14 am
your php code won't ever be displayed to the user as long as it's in a file with a .php extension. Even disabling right click doesn't protect your html/javascript source though, as users can save the file and edit that way, or hit their selection button beside their right control key and get the same list. If you still want to block right click, use javascript to set an even to the right click event, maybe an error message that says "stop it". Or you can right click redirect to a page that adds the ip of those that visit it to a blocked list. kind of a one strike and you're out thing. it's all doable but not really necessary if you keep your sensitive code in the PHP and not in html or javascript.