Hi,

Is there any method i can enconde and decode the PHP script, so my client won't see the source code? I know there is some Zend products can do this, but wondering is there any others method i can do without add in any additional application at my clent server.

THanks
Louis

    Not sure what you mean - http clients will not see your php source, it is parsed server side and the browser will only ever see the output ... ?

    Can you explain a little more what you are trying to do ?

      Why? Does your code suck and you don't want the client to know?

      If your client is paying for a php application, you should just leave it as-is and put them under a contract that says if they modify the code then you have no obligation to support them AND they cannot resell your code or any derivitive of it.

        Sounds like he wants to sell PHP programs in a format that the client couldn't reverse-engineer/resell them easily.

        Short answer: No.
        Long answer: Yes, but ...

        Unless you are able to find a non-Zend compiler or host the files on a server which you have sole control, you don't have much of a choice but to trust your clients (standard procedure is to include a clause in the initial contract that protects against this).

        However, there is another option.

        A while back, I seem to remember someone on the board throwing together a script that renamed every variable to a random series of characters (unique to each variable, of course), removing every newline, toasting all comments and some other formatting stuff. This would make it pretty confusing for an end-user to play with. You would, of course, keep a version that you could play with and re-sell. This is not foolproof, of course, because the encoding script could be reversed and except for the variable names (which I generally find very helpful when trying to figure out what a program does), the original program could be reconstructed.

        Short of this, I can't think of anything.

        -Ben

          Hi all,

          yah, what i trying to do here is to resell the application to clients. That's why I have to PROTECT my code when insatlling to client server which i have no right to play with the machine. That's why i need to find some script which can help me avoid my client to modify the code, and sell it out, and it is hard for me to check around and make sure my client didn't reconstruc anything and resell my application. :-)

          so ben, i pretty interest of the script you mentioned which will change the variable name.. do you know where i can get it?
          how about others advice for my situation here, since this is the first client I have and wondering what should I told my client about the SOURCE CODE.

          Any advice is appreciated.

          Thanks in advance.

          Louis

            Sorry Louis, I don't know where you could find the script. You might search through the archives or even (better yet) build it yourself. use come preg_match_all and str_replace statements in a loop and run the code through as a string.

            I may take a crack at it tomorrow. If I figure a good way, I'll post it.

            -Ben

              Hi Ben,

              Appreciated that! I will wait for your good news, else I will crack myself for this. :-) and it seem pretty hard too.. hehe.

              THanks
              Louis

                Write a Reply...