RE: [PHP-DB] how to hide my code?

From: Date: Wed, 18 Sep 2002 19:14:34 +0000
Subject: RE: [PHP-DB] how to hide my code?
Groups: php.db 
Request: Send a blank email to php-db+get-21838@lists.php.net to get a copy of this message
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server -----Original Message----- From: Hutchins, Richard [mailto:Richard.Hutchins@GetingeCastle.com] Sent: Wednesday, September 18, 2002 1:11 PM To: Ryan Jameson (USA) Subject: RE: [PHP-DB] how to hide my code? Ryan, Where can I find info on $HTTP_REFERRER? I checked PHP.NET's online manual and didn't see it. I'm interested in learning more about how it can be used. Thanks, Rich -----Original Message----- From: Ryan Jameson (USA) [mailto:RJameson@usa.ibs.org] Sent: Wednesday, September 18, 2002 3:04 PM To: Hutchins, Richard; php-db@lists.php.net Subject: RE: [PHP-DB] how to hide my code? create a seperate file myJavaScript.php and inside that file have something like this: <?PHP if ($HTTP_REFERRER == "mySite"){ ?> my javaScript functions <?PHP } else echo "No Snooping!"; ?> Then in your page use <SCRIPT src="myJavaScript.php"></SCRIPT> This works really well!!! <>< Ryan -----Original Message----- From: Hutchins, Richard [mailto:Richard.Hutchins@GetingeCastle.com] Sent: Wednesday, September 18, 2002 12:35 PM To: php-db@lists.php.net Subject: RE: [PHP-DB] how to hide my code? There are javascripts out there to disable the View Source option when the user right clicks on your page. Disables for the whole page though, not just a section of your code. Search here: http://search.internet.com/www.javascriptsource.com Thing is, scripts like those are easily defeated and the determined user will be able to circumvent your disabling script and view the whole page anyway. Something as simple as disabling javascript is enough to get around it. Best way to hide the script (IMHO) is to make it server-side using PHP or SSJS then put it in a directory that is made "unbrowse-able" to anonymous users through web server permissions (CGI-BIN, for example). Have fun. Rich -----Original Message----- From: Bo [mailto:bo1st@hotmail.com] Sent: Wednesday, September 18, 2002 2:28 PM To: php-db@lists.php.net Subject: [PHP-DB] how to hide my code? I wrote a block of javascript code, what is the easiest way to hide my codes? Thank you. Bo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#21838) next »