Jump to content

Compiled Php Code


birbal

Recommended Posts

i am interested to know how does the lisence of php application being managed. as php source code is viewable if it is being distributed so how can anyone protect its code from any reverse engenering? the quick google revealed that some sort of compiled php can get the job done. it can be transformed into byte codes and then it get decoded and being used. though i am not sure how does it work. and what i need to look up for doing this. how to implement it?

Link to comment
Share on other sites

It should be noted that whatever you do, you're still allowing the package to be copied... the best thing a distributor can do is attach a unique ID somewhere so that they know who originally paid for that instance. It's theoretically possible to set a self destruct upon receiving a special response from your own server, to which the application would connect regularly... but doing that without explicitly telling the user is a breach of privacy, and with telling, it will likely lead to fewer customers. With that in mind... there are several approaches to compiling and obfuscation:1. Using a signed PHAR file. This would not prevent anyone from viewing and editing the files in it, but if they do so, the signature would become invalid, and the distributor can take legal actions with the invalid signature being their evidence of illegal activity.2. Using Zend Guard. This would compile the PHP into byte code that shouldn't be easily editable (to say the least), and I believe there's also a signing option, so you also get the same benefit as with the PHAR should anyone succeed in altering the files. A caveat of this approach is that the client needs to have Zend Optimizer installed, which in turn means they can't have other Zend extensions (e.g. XDebug).3. Using compilers like Roadsend PHP Compiler or HipHop PHP. You have all benefits above, plus a lot more efficient application, and a lot harder to alter. Drawback is that the application will run "stand alone" i.e. can't be integrated into an existing infrastructure in any way.

Link to comment
Share on other sites

You can still place restrictive licenses on plain text documents, if you wish.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...