Page is a not externally linkable
usavetele - 4:01 pm on Jul 10, 2005 (gmt 0)
Here's what I found in an old Javascript forum, can't figure it out: Don't want your javascript copied? Here's a very simple script that will hide it! On the page where the javascript is placed, add: <? And now create a new file called script.php and place your javascript there: <? alert("Woohoo! My javascript Works!"); <?
Ok, I've found the following for hiding Javascript, but it doesn't work for me. From the coding below, where does the second piece of coding go?
session_start();
if(!session_is_registered('allow_script'))
{
session_register('allow_script');
$allow_script = true;
}
?>
<html>
<head>
<script language="javascript" src="script.php"></script>
</head>
<body>
Body goes here...
</body>
</html>
session_start();
if($allow_script)
{
header("Content-type: text/javascript");
?>
$allow_script = false;
}
?>