uhh... you do know HTML, dont you?
the header is:
<html>
<head>
<!-- this is the header area -->
<title>bob</title>
<!-- you put scripts like your anti-context menu script in this area -->
<script language=JavaScript>
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</script>
</head>
<body>
<!-- this is the body area -->
</body>
</html>
and... you dont want the javascrip code to be sent along with the image generated by a php script, otherwise it will be a broken image...
but if you really dont want people selecting things, use that code, and put this in the body tag:
<body ondragstart="return false" onselectstart="return false">