|
-
Mar 11th, 2004, 01:26 PM
#1
Thread Starter
Frenzied Member
encrypt html/javascript source using php
Hi,
I've created a javascript 'game animator' for viewing checker games using javascript. I would really like to avoid having people view and/or steal my code to use in their own game viewers.
What i would ideally like to do is set it up so that when the encrypted animator.html file is viewed, PHP decrypts this file so that it is readable by the browser (but so they cant view source).
Is this kind of thing possible with PHP? I'm pretty new to this, and I don't expect someone to do the coding for me. All I'm asking for is a simple yes or no, and maybe a link or two I should look at for more info on this subject.
Thanks for your time
-
Mar 11th, 2004, 01:43 PM
#2
Here's the deal.... in order to send it to the browser, it needs to be decrypted so the browser can understand it. If someone does a right-click "View Source" they would be able to get the source that way.
To answer your question though, yes, PHP could be used to store the file, open it up, decrypt it, and send it to the browser. The specifics of it I'm nott too clear on as I've never done that before.
Might I suggest you take a look at http://www.dynamicdrive.com - they have javascripts that might be of some use (even a script that preventsthe right-click "View Source")
TG
-
Mar 11th, 2004, 03:24 PM
#3
Frenzied Member
Preventing the "right-click" will not secure your code. Most browsers also have a option under a menu to view the source. Look around on the web for obfuscators like this one.
That won't completely secure your code, but hey, it's a client side script... there's not much more you can do than that.
-
Mar 11th, 2004, 04:55 PM
#4
Thread Starter
Frenzied Member
I want to do the same thing this guy did with his animator
Can anyone figure out what he is using to encrypt his animator code? If you try and view it, it's encrypted somehow. Even if you view source, you still cant view it, unless I'm not doing it right.
The actual code for his viewer is located here
Anyone?
-
Mar 12th, 2004, 07:55 AM
#5
Frenzied Member
My guess is that he used a really good obfuscator. Did you try looking at one of them? Some are better than others and I'm pretty sure that's how he did his.
-
Mar 12th, 2004, 10:06 AM
#6
Thread Starter
Frenzied Member
no, its clearly encrypted
I'm really not interested in an obfuscator
-
Mar 14th, 2004, 11:08 AM
#7
Frenzied Member
CCI Website Security System, will encrypt your source. It uses a cookie as the key, so it is always different. Though, there is a new one in developement, I have suggested the use of this free drop-in PHP script many times.
It does much more than encryption, by the way, that's just a trick.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|