I have a php web application which I want to limit the number of computers a client can install on depending on the price. e.g for $200 you can install on a maximum of 5 computers/servers, for $400 one can install on a maximum of 15 computers/servers and for $1000 you get unlimited installations. How can I achieve this using php?
Anyone who knows how I can achieve this? I have searched the same but I can't get anything about it.
Since php it's interpreted, you share your code. If you want to make a downloadable and installable product with such license protection you need to obfuscate your code, using an external call to your licensing webservice.
The problem is that is easy to spot and to null (bypassing) the license checking since your code is visibile. You can look at IonCube. https://www.ioncube.com/php_encoder.php This encode your code and allow you to provide a kind of encryption that requires inverse engineering to read. (your costumers need to have a server with ioncube support). It's commercial.
Other way is that you host yourself you app and you sold access to your service.
Maybe have a look at https://www.ioncube.com/php_encoder.php?page=features as with other solutions it's not 100% bulletproof but it makes it a lot more difficult to share unauthorized copies.