...

View Full Version : How To Hide Code When Remote Scripting with IFRAME, Javascipt & PHP?



dealmaker
07-13-2005, 08:18 AM
Hi,
I am planning to use Remote Scripting with IFRAME, javascript and php. The problem is that I want to hide the javascript and php code from visitors, so that they can't look at my code inside the js and php files. This is a business site, I don't want hackers to look at my code. How can I do that?

Many thanks.

Philip M
07-13-2005, 08:35 AM
This has been asked a zillion times and is in the FAQs. The answer is - you can't.

Q: How do I hide my JavaScript source code?

------------------------------------------------------------------------

A: JavaScript, the way you most likely are using it, is a client side technology. That means that if you at all want to use JavaScript on your web site, it must be sent to the client in such a way that it can be read by the client machine and executed there. What happens at the client is not controllable by you - if the machine is able to read it, so is your user. Thus, any try at hiding the source code is futile. Anything you try to do to make it harder to read by the user is still not enough, because when the machine can read it out for execution, so can a user. So, forget all about trying to protect your source code. Place a copyright statement on it instead, that's the best copy protection that you will be able to find.

nerdbyte
07-13-2005, 09:15 AM
I like to go around and track down all users, and tape their eye lids shut with masking tape. If that doesn't work, I use that thingy on the Men in Black movie that takes away their memory. And if that doesn't work, I change my name and move to the next state. :thumbsup:

jbot
07-13-2005, 11:12 AM
I am planning to use Remote Scripting with IFRAME, javascript and php. The problem is that I want to hide the javascript and php code from visitors, so that they can't look at my code inside the js and php files.

no one can see the PHP anyway, since that's processed serverside. as for the JS, it shouldn't include anything which reveals the business of logic of your application anyway, only being used for display purposes and presentation processing, ie deciding which data goes where in the layout.

glenngv
07-13-2005, 11:12 AM
http://www.student.uwa.edu.au/~mikula01/funny/hide_source.htm
http://www.codingforums.com/showthread.php?t=47343

_com
07-13-2005, 11:57 AM
what about encrypting the code with php: md5 or other encryption methods?

For example dan benjamin uses encryption (with UTF-8 entities) to encrypt a javascript e-mail link ...

a high levell of encryption is needed - This is an example to encode a mailto:link with javascript (works only when javascript is enabled).

<http://automaticlabs.com/products/enkoder>

glenngv
07-14-2005, 03:22 AM
Any form of encryption is futile because...


...if the machine is able to read it, so is your user.
...when the machine can read it out for execution, so can a user.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum