View Full Version : PhP Security scripts
Vince7
Fri 18th Jun '04, 9:58am
Does anyone know where I can get php security scripts. One to stop the right click mouse button. One to not allow the internet explorer's tool panel to take pictures from your pages. Also a hotlink stopper script for html and php.
cirisme
Fri 18th Jun '04, 10:33am
None of these require PHP.
The last one can be done with Apache:
http://www.bignosebird.com/apache/a13.shtml
Floris
Fri 18th Jun '04, 10:38am
You can't prevent end-users to right click, save a file as, or make a complete screenshot.
You can do a little using javascript, and use php to prevent hot linking, but javascript is clientside scripting and therefor can be bypassed.
Vince7
Fri 18th Jun '04, 9:20pm
Thank you very much for your help!
Vince
Vince7
Fri 18th Jun '04, 9:43pm
Well I guess I should have asked the follow up question. Where would these scripts be placed? Index.php file? Or any php page?
I understand where the script goes in the html page source, but not in the php source page:
<HEAD>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<TITLE></TITLE>
<SCRIPT language="JavaScript">
<!--
var message="Right click not available.";
///////////////////////////////////
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(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=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</SCRIPT>
</HEAD>
Floris
Fri 18th Jun '04, 10:09pm
What is there in between the header tags, goes in your pages, in between the header tags.
If your php files use templates, open the template that makes up the header.
vBulletin® v3.8.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.