I want to divide my web application into two parts. One part is free, like a demo for people to use. The other part is not; a extension that is paid for but requires authorization and a license to use.
My idea is to sell the extension without having it being compromised. Once the extension is sold, the buyer can't upload it to some other site and make it "free" for other people to use. Thus the extension would check a database from another domain to authorize the use of its script.
How can I achieve this?