hiding

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simian
Forum Newbie
Posts: 1
Joined: Thu Oct 26, 2006 1:31 am

hiding

Post 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
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post 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.
Post Reply