I think, perhaps, you've done your business planning all the wrong way around. This is the sort of thing you should have figured out before doing something that "took ages." In general you've picked up a particularly hard problem. The short answer (which is all I'm inclined to write right now) is that you have a choice - either encrypt the program and don't allow access to it without a key or just put some technical barriers in place but nothing that ultimately prevents access.

Before going on I want to note that your PHP code isn't encrypted - it's just compiled. This distinction is important because the rest of this note relies on this information. Its like the difference between a novel published in two languages. You may only be able to read one copy but that doesn't mean that someone else can't read both.

The first choice - encryption looks like this: your customer may download the program but it is unuseable without the key. Once you give your customer the key then you've allowed them to unlock a "safe" and get a novel out (of whatever language). At this point the user may or may not futz with their copy or do whatever they want. The point is once a program is useable it is also readable and modifiable.

The other way to go acknowledges that security is impossible and just attempts to make life hard on the potential user. I'm not inclined to help you with this part but I will give you a pointer to the ACME:: namespace on CPAN. There are a few modules that may help with your source-code-obfuscation endeavor there.


Seeking Green geeks in Minnesota


In reply to Re: Registering and License Keys by diotalevi
in thread Registering and License Keys by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.