I built a web application using PHP. Now, I want to sell this web application online for customers but I want to guarantee that only one customer (only one website) use this. Is there a way to make the script under a license (which I provide)?
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
The simplest thing you could do is provide each user with a
and ask for that token before actually serving your app to anyone. Picture that as a proof-of-buying, and treat it like so (enabling users to renew their token, for instance, whenever they find it appropiate)
EDIT Oh sorry I understood you wanted to sell your application as a service (pretty much the only sane way to charge for a script-language-based application).
In case you want to actually try to ship this to other people and have them be the only enabled user, you would need to make sure that
And that would still not be 100% adequate.
You cannot realistically assume that your code will not be used ilegitimally anywhere as long as all the logic is sitting in cleartext in front of your client (and such is always the case in PHP, no matter how much you obfuscate things you´re only making the unencoding marginally more annoying for the cracker)
Yes you can ship your software with a license which disallows non permitted usage, but we know that out there are lots of people who copy and redistribute your software against the law and your license.
When adding some kind of domain and license verification to your application you have one problem - the php source code is open when you distribute it. So everyone can easily read and edit your source code and null the application in this way. Also the end of the story is redistributing the application...
But there is one way you could go.
ionCube Encoder encodes your PHP source code in unreadable fragments which can be only decoded and executed with an matching license key.
You can also use your own license scheme like an algorithmus which converts an user installed license token to the domain on which the application is allowed to execute. If the domain mismatches exit() the script execution.
But always keep in mind that there is no software and no license which protects your source code up to 100%. So write an application which is exciting, which is so good that your customer loves you and has no problem with giving you the money for good work ;-)