Is there a way to protect a php script from being used without a valid license?
<p>Is there any chance to restrict a php script from being shared and used without license? The scripts are paid and I am thinking what could be a way to prevent "sharing" this php script from happening. Is this possible or impossible? Because the code is open and I can't encrypt all of it.</p>

<p>I came to a conclusion and not sure if this can work or no?</p>

<p>A. The script asks user to enter a LICENSE/KEY</p>

<p>B. The license is sent to my licensing server and check whether the license is a valid one. (http://.... ?license=X)</p>

<p>C. The license is checked and the result is sent back to client server.</p>

<p>D. The script won't execute if the LICENSE is not valid.</p>

<p>Is that practically possible? or no?</p>

<p>Problem remains that the user can remove the license check part right (Since the code is open) ? But I could maybe encrypt that file and make it part of a core file that wouldn't have to be edited by user but still required file that if it was removed, the script won't function probably.. hmm I am lost :)</p>
