Advertising (This ad goes away for registered users. You can Login or Register)

Protecting PHP code?

Programming on your favorite platform, for your favorite platform? Post here
Xian Nox
Retired Mod
Posts: 2744
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: Protecting PHP code?

Post by Xian Nox »

Nickolas wrote:
Xian Nox wrote:They can't see the PHP code, since it's executed server-side.
Still you don't get me. I need this code to be protected even if the server is hacked... I need it to be hidden somehow...
If your server is hacked, you're scr..ed. The PHP code can be taken, but the database you have can be accessed as well too, and this should be your main concern.
You could make a server module instead of using PHP scripts, but if the server is hacked, it's a bad situation again.
Advertising
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Protecting PHP code?

Post by wololo »

You can look at the discussions here:
http://stackoverflow.com/questions/2327 ... or-for-php
Advertising
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
Nickolas
Posts: 174
Joined: Sat Jan 22, 2011 3:14 pm
Location: In a black hole...

Re: Protecting PHP code?

Post by Nickolas »

wololo wrote:You can look at the discussions here:
http://stackoverflow.com/questions/2327 ... or-for-php
The license solution they mention at stack overflow is actually pretty good but how do I prove the code is mine?
Image
Image
Image
Image
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Protecting PHP code?

Post by wololo »

Depending on your license, your code will have the license in the headers, the license will probably contain your name, to identify you as the author of the code.

I also assume at some point you will sign a kind of contract (or oral agreement) with the owners of the website, that should be enough proof?
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
Nickolas
Posts: 174
Joined: Sat Jan 22, 2011 3:14 pm
Location: In a black hole...

Re: Protecting PHP code?

Post by Nickolas »

wololo wrote:Depending on your license, your code will have the license in the headers, the license will probably contain your name, to identify you as the author of the code.

I also assume at some point you will sign a kind of contract (or oral agreement) with the owners of the website, that should be enough proof?
Thanks :) I'll have a talk with the owners to make an agreement ASAP.
Image
Image
Image
Image
svenn
Posts: 65
Joined: Fri Dec 24, 2010 5:17 pm
Location: Belgium
Contact:

Re: Protecting PHP code?

Post by svenn »

I hardly think its worth the efford to "protect" your code that hard. Everyone can remake your code; You can use "hidders" for php and html. But both can be reversed. If you want your code to be "yours" really I think opensource is a way better way to go. Yes everyone can see it, but tons of people know you made it and you contribute back to a very large community.

very good tip thought :
Write bad code, then it comes pre-obfuscated ;)
Nickolas
Posts: 174
Joined: Sat Jan 22, 2011 3:14 pm
Location: In a black hole...

Re: Protecting PHP code?

Post by Nickolas »

svenn wrote: very good tip thought :
Write bad code, then it comes pre-obfuscated ;)
LOL
Image
Image
Image
Image
jeerum
Posts: 52
Joined: Tue Oct 05, 2010 2:16 pm
Contact:

Re: Protecting PHP code?

Post by jeerum »

http://www.ioncube.com/?gclid=COmPkq2om ... 3god3VtaoQ
it helps encrypt your script, and most hosting company has ioncube support !
Ps2- PsP - Ps3 - PsVita - Ps4 - Ps4 pro
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Protecting PHP code?

Post by m0skit0 »

Just a reminder: this won't ever make your PHP code unbreakable (e.g. strongly encrypted), it will just make it harder to break (and not very hard anyway).
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
Rahim-US
Guru
Posts: 95
Joined: Thu Jun 30, 2011 8:53 pm
Contact:

Re: Protecting PHP code?

Post by Rahim-US »

you can protect your PHP code by using bcompiler http://us2.php.net/manual/en/intro.bcompiler.php
Locked

Return to “Programming”