in reply to How could I use CGI to hide my javascript code?
...Setup the session and output CGI headers... $session->param(js => 1); print <<'__EOI__'; <html> <head> <script type="text/javascript" src="javascript.php"></script> <title>Untitled Document</title> </head> </html> __EOI__
...Setup the session and output CGI headers... if ($session->param('js')) { print <<'__EOI__'; document.write("Hello World!"); __EOI__ } $session->param(js => 0);
|
|---|