You are here
Home > Php > Web Application Installation Detector in PHP

Web Application Installation Detector in PHP

web-application-installation-detector-featured

Hello Friends, Today we are going to learn how to make web application installation detector in PHP. I came up with this idea because many of the times we develop for client but even after delivery we don’t get payment. Or sometime we develop for free or in partnership then might be possible your application get copied and distributed without your knowledge. So in these situations it can be very helpful to track where your application is running and performing some actions i.e suspending, deleting/terminating. Now without wasting any time lets code but before coding we need database and a table in it to store installation data.

There will be two part of this code one for server side which will reside at our end and another for client side which will be in the actual application which we are delivering/distributing. Make sure you host server/our side code publicly available on internet. You can use third party hosting.

Server Side Code

config.php

Here in the above code database connection information needs to be changed accordingly i.e database name “applications” to your database name, username to your username and password to your password etc.

requests.php

index.php

This code is for showing list of all the installations and performing actions like activate, suspend, terminate.

Screenshot

app-installation-detector-host

Client/Application Side Code

index.php

Here in the above code https://zatackcoder.com/demo/ should be replaced with your domain or ip address and then code can be pasted at the top of every page or you can create header.php and include it in every page of the application. You can also see getMac() function in above code which is to get MAC address of the system if your application is running in localhost. It detect multiple copies of your application on different system running localhost. You can identify multiple copies of your application using MAC address.
Note: if you don’t want to perform any action and the application will be hosted on any third party hosting i.e godaddy, hostgator, bigrock etc. then below one line code is enough to track installations.

Screenshots

app-installation-detector-client-active

app-installation-detector-client-suspended

NetBeans Project Download

 

Thanks friends
Please don’t forget to share if you find this helpful

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top