Page 1 of 1

hiding

Posted: Thu Oct 26, 2006 1:34 am
by simian
I made a Navigation script in javascript the other day for my friend who is making a game. It's a point click system where you point in screen and you player moves. When the player moves over a town a town menu comes up but when the player moves out of town the menu closes. When you go off screen the map scrolls and so allowing you to explore a huge area.
I don't really want anyone else to get this script, apart from my frined and I, and so I was wondering if there was a simple way of placing the script inside a php script and using the

<script language="javascript" src="whatever"></script>

tags but when someone goes to the javascript page it stops them from stealing the script. How would i do this in PHP. Thanks

Posted: Thu Oct 26, 2006 4:22 am
by Mordred
No you can't.
Javascript is a client-side technology, which means it has to reach the client in order to execute. You can try obfuscation or encryption, but this would only stop newbies.