Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

encrypting your code

Status
Not open for further replies.

pushyr

Programmer
Jul 2, 2007
159
GB
i've just finished writing an app and i would like to protect it by using encryption.

i've googled 'php encrypt code', but thought it'd be better if i asked the question here as you guys would have a good amount of experience with encrypting you work.

what would be my best approach?
is there an encryption program that you recommend?
anything i should consider?

 
nothing is going to be properly effective short of making your code a remote web app offering an API only.

but if you want only to obfuscate then you might take a look at zendguard.
 
ok, interesting replies that i didn't expect.

the api solution sounds interesting, but i might not pursue it for the moment, as i'd have to rethink how i've built the app.

ingresman, what did you mean by create your app as an extension?
 
You know that when you use things like mysql you are actualy loading an extention i.e. it's not part of the core PHP. This is so you can extend the language to suit your requirments e.g. if not have to use an old legacy database you might be able to create an extnetion to use it via PHP. In essence it's a subroutine library.
In your instance you could create all the functionality to support your app an extention. The advantage being it is written in C so is compiled and therefore the source is not visible to any one. However it is hard to do (never done it but I'm told it hard !).
You would still have some PHP but that would just tie togerher your functions, but your secret code is secret, the PHP would just orchestrate any functions and provide the visual rendering.
Just out of interest why do you need to obfuscate your code ?
 
This statement,from PHP and MySQL Web Development may have some implications you should be aware of if you include any files in your code:

One issue to be aware of is that if files ending in .inc or some other nonstandard extension are stored in the web document tree and users directly load them in the browser, they will be able to see the code in plain text, including any passwords. It is therefore important to either store included files outside the document tree or use the standard extensions.
 
thanks for the response guys... i'll start thinking about what direction is best to take
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top