Page 1 of 3

How can I protect my code?

Posted: Thu Jun 03, 2004 8:03 pm
by mjseaden
Dear All

My new code has some pretty nifty technology in it that I don't want anyone else to copy and profit out of (that's just against the rules!).

I've got all my PHP scripts in separate PHP files on my server's public HTML directory. I know if you go to View->Source you can view only the HTML output, however is there any way to stop people copying/downloading my code? E.g. some encryption system that won't take a lot of bother or processing time to use? Or some other method?

What permissions should I use for my PHP scripts for maximum security (bearing in mind they need to be accessed in order to run). Do I turn off 'public read' and just leave 'public execute' on? Would this make them only runnable (i.e. only HTML output viewable in browser) but not capable of being downloaded by a user?

Many thanks

Mark

Posted: Thu Jun 03, 2004 8:33 pm
by qads
there was a post about this a while back...and few before that aswell, search the forum.

here is a start for you...

viewtopic.php?t=20440&highlight=protect+code

Posted: Fri Jun 04, 2004 10:39 am
by anotherJean
sorry, but you don't have a clue of anything, though your " new code has some pretty nifty technology in it"?
:lol:

hmmm I think I know why you want hide your nifty code, but I won't say it loud. :x

Posted: Fri Jun 04, 2004 10:47 am
by Joe
You do know that PHP is executed on the server and then it gives the output. I would find it practically impossible for someone to view your source unless they that ftp access or you were foolish enough to create a script which opens a file given by a variable, like

viewfile.php?file=blah.txt

Also remember to put an index page in each directory to prevent others from seeing your directory listing. And anotherJean just say what you have to say as im very interested. I personally think the user in question is just thinking of the aspects of his security so please do not abuse others for no reason whatso ever. Nevertheless code on and best of luck with your security pal!

Posted: Fri Jun 04, 2004 11:03 am
by anotherJean
I'm sorry for beeing too harsh. though my opinion remains. and he's not concerned about security (passwords ... whatsoever) but about protecting his "nifty technology".

Posted: Fri Jun 04, 2004 11:04 am
by Joe
lol, you weren't being harsh, just freeing your opinion as you said. Nevertheless, who cares as long as the guy is happy;)

Posted: Fri Jun 04, 2004 11:18 am
by anotherJean
Joe wrote:lol, you weren't being harsh, just freeing your opinion as you said. Although who cares as long as the guy is happy;)
ok ok I'm calming down ... who cares ... world is beatiful :D :roll:

Posted: Fri Jun 04, 2004 11:25 am
by Joe
peace my friend ;)

Posted: Fri Jun 04, 2004 12:27 pm
by magicrobotmonkey
on my server's public HTML directory
hes concerned about other users on the server looking at the code!

Posted: Sat Jun 05, 2004 2:59 pm
by qads

Code: Select all

IndexIgnore */*
put that in a .htaccess file and upload it to your root, that will stop all dirs from listing files in them :D.

Posted: Sat Jun 05, 2004 3:46 pm
by bla5e
get Zend

Posted: Sun Jun 06, 2004 9:17 am
by kettle_drum
Write a license for it saying that nobody can copy the code without your permission and payment etc etc.

Posted: Sun Jun 06, 2004 11:14 am
by mjseaden
Thanks to those who made helpful comments. Everyone else - you really know how to waste your own time. I want to protect my code because I just spent the last 3-4 months of my life making it - is that simple enough?

Mark

Posted: Sun Jun 06, 2004 11:17 am
by tim
kettle_drum wrote:Write a license for it saying that nobody can copy the code without your permission and payment etc etc.
the chances of that being effective is slim

face it, if someone has the intentions of copying the code, how would anyone else be able to find out if their code is being used? Copyrighted or not, its just the harsh reality of lazy slobs who cannot write their own.

Posted: Sun Jun 06, 2004 4:46 pm
by anotherJean
mjseaden wrote:Thanks to those who made helpful comments. Everyone else - you really know how to waste your own time. I want to protect my code because I just spent the last 3-4 months of my life making it - is that simple enough?

Mark
my names's not everyone else :roll: whatever you can't hide your code. just don't write it, that's the best solution to keep it secret. there's so much brilliant code out there, just believe no one's interested in your "nifty technology".
referring to your first post above I just doubt you are able to write such great code as it seems you even don't know the basics. however if it's really your own code, try to hide it, waste your time and your/servers ressources .

oops I am being harsh again? I'm sorry. I just had to put in my two cents' worth

btw my suggestion

Code: Select all

<?php

    print str_rot13(str_rot13("nifty technology")) ;

?>
:lol: