View Full Version : encrypt source code

09-29-2005, 06:28 PM
hello all,

Does anybody know how to protect a web site.
Ideally, I would like all my PHP, HTML, .css, .js, images source code to be encryted before I put it on the server.
Then I would like the source to be encrypted when viewed in browser.

I have looked around but can not find anything that does it.

Any help would be appreciated

09-29-2005, 06:32 PM
First off, no one can see your php. So there's no point 'encrypting' it.

Second, there's no way to protect html, css, js. No matter what you do, it'll be pointless as if a browser can 'decrypt' it, then so can a person.

See the sticky above on protecting source code


09-29-2005, 08:04 PM
Nightfire is dead on, there is no way. This all has been discussed throughly before, even multiple times.

If anyone says it is possible, they don't know what they are talking about. Read the sticky, it will clear everything up.

09-30-2005, 11:05 AM
ok guys... I understand.
My web site is actually gonna hosted with somebody who should not be allowed to view my original PHP code. I'll have to live with the fact he can see the generated code but I MUST prevent him from seeing the PHP.

What would you siggest when it comes to this?

09-30-2005, 12:29 PM
Get another host?

09-30-2005, 12:31 PM
indeed, if it's that important why not lash out a few quid a month to get a proper host that you control?

09-30-2005, 12:41 PM
A separate host is a good idea but my application would run in schools and web security is extremly strict with these people.
The server has to be run within the school and the school administrator wants total control over the server which is fair enough... but I don't want this guy to look at the PHP code

09-30-2005, 01:23 PM
Only thing I know of (that's any good) is the zend php encoder. BUT, that'll require the school having to spend a small fortune (IIRC $900 p/a) which I don't think they'll do just so the admin can't see your code.

09-30-2005, 01:57 PM
does the schol wallah know php and why would he care> is he going to nick and cut you out of the loop?

make it almost incomphrehensible to decipher I suppose, ghastly syntax, variable names, and so on, and/or bury some bits in it to identify the code as yours in case it ever comes to some sort of copyright thing

assuming that's what this is about

09-30-2005, 03:06 PM
Why do you want to hide it?

09-30-2005, 03:50 PM
Our site is a training system (virtual teacher). It has a frontend and a back-end (where teachers can administrate teachers, classes, students,... They can export student reports with their results,...)

One thing we want to avoid is to have the schools adding modules to the system without us knowing. If the site is encrypted, we know for sure they will come back to us if they need more work to be done.
+ we don't want the schools to use our code to develop their own training sytem.

If we release them our code, we give it all away for them to developp very easily their own system

09-30-2005, 05:15 PM
some sort of license or agreement is in order then?

if it's effectively software then can't you register it or something?

otherwise when they pay for it, they get it and it's theirs isn't it?

09-30-2005, 07:02 PM
Yeah a license agreement or something similar sounds like it is in order. That way if they modify your program you can take legal action against them if you wish.