Ok,
basically, as part of a licensed script i am creating i have put in place PHP protections to stop the javascript being able to be viewed directly over the net. So my plan was to put the licensed javascript within a PHP file and so if the script was called from the allowed page via a <script src="javascript.php"> then all would be fine, but if someone tried to point their browser to javascript.php it would not display the contents of the file.
So how can i get PHP to check whether it is being accessed directly or whether it is being included as stated above?
Thanks
basically, as part of a licensed script i am creating i have put in place PHP protections to stop the javascript being able to be viewed directly over the net. So my plan was to put the licensed javascript within a PHP file and so if the script was called from the allowed page via a <script src="javascript.php"> then all would be fine, but if someone tried to point their browser to javascript.php it would not display the contents of the file.
So how can i get PHP to check whether it is being accessed directly or whether it is being included as stated above?
Thanks
Comment