I'm writing a script that I eventually hope to sell. The script will be hosted on the user's server, and will be licensed on a per domain basis. What is the best way to stop people from using the script on hundred of domains? Is it feasible to have the script 'phone home' to my server to check the referring domain? And if so, how would I go about approaching this?
You could implement a licensing system into your script with encoded license files. The license can be validated/renewed by phoning home but you should limit this to once daily or so to avoid significant script slowdowns. Phoning home on every script execution is definitely a bad idea and will cause you a lot of stress when the licensing server goes down and angry customers come after you
Here is a commercial solution: http://www.phpaudit.com/ Browsing through the site will give you an idea of how it works and how it is implemented. I am currently writing something similar. The basic idea is: - Encode your script classes, for example with ioncube encoder. You really need encoding or at least some decent obfuscation, otherwise anyone with a little programming knowledge can erase or tamper with the licensing code. - Another encoded class saves and reads an encrypted license file, containg validity data (key - expiry - ip/domain - max. users - ...). This file is checked on every script execution, and if no longer valid a phone-home call to the licensing server can be made to renew it.
basically if ur script has a admin panel u can add a track back there to see which sites are using it for total security u will have to encode ur script only others wise there are many nullers
I would recommend IonoLicensing.com script because it uses a local license key method that callsback say once every 15 days and stores data in an encrypted license file on the users server so its not calling back on every load. Plus Iono has got a easy php class for the licensing code to use so its easy to modify it to your needs.