Protecting Javascript via PHP

From: Date: Thu, 28 Oct 2004 14:24:24 +0000
Subject: Protecting Javascript via PHP
Groups: php.general 
Request: Send a blank email to php-general+get-200540@lists.php.net to get a copy of this message
Hey, I have been searching around the web for a way to "mangle" my javascript code the way some people do it to HTML/PHP etc so its not so easy to read. There is no "sure" way to do it and if a person is REALLY determined to get to your code...he can, but I would like that person to go through some extra effort before he gets to it... the idea being to have a tag like this: <script language = "JavaScript 1.2" src="javascript.php?some_parameter_here"> if the correct $some_parameter_here (or parameters) is passed then to output the code....if it can output the code only to another php script too it would be great... I have also been reading the doc at shiflett.org as the present question of "protecting PHP scripts" is kind of close to this, one problem....no sessions can be used at all. The above is my idea in the rough......would anyone care to extend on it? just plain comments also welcome. Thanks, Ryan

« previous php.general (#200540) next »