Multi Part Question:
I am developing a php app that I plan to sell and distribute. I want to control who has access to the apps main functions and installation though some sort of call to my server, which would check to see if the script's install location (example.com) is in a database, maybe even check for a license key of some sort.
Anyone have any general guidelines for securing a distributed PHP program? I don't expect total security, but I would like to release the script with a trial, and would want to discourage the average person from monkey-ing around with the code to try and circumvent buying the script.
I had two ideas in mind - having a script "phone home" with the script server address, and checking that address against a database (simple enough), or doing that in addition to generating some sort of license key and hard-coding that key into the script, either in a file, or in the DB install queries.
My question is, if I go the latter route (hard-coding), what is the most efficient way to hard code a key into a script at runtime and package it all into a unique zip file?
I would be using bcompiler to try and obfuscate the authentication functions used above. I know you need to have support for bcompiler compiled into php in order to write bytecode, but are there any special requirements to run compiled bytecode? My app will run on a variety of machines, but with the common condition that they would all be running php5, so the code needs to be able to work on restrictive hosting environments (where they can't upload external terciary php libraries, for example).
Any and all insights are strongly appreciated.
Can anyone answer my last question? Can php w/o bcompiler read and execute bcompiler generated bytecode files?