If your question is:-
Should the server ask the device where it is? Or should the device tell the server where it is?
The answer is, the device (client) should tell the server (web server) where it is. This type of system is very easy to implement.
The client would most likely send a GET
or POST
request to the server with variables detailing it’s location.
An example URL using GET
:-
http://www.example.com/setClientLocation.php?clientID=3&latitude=51.45346&longitude=-3.85234
solved GPS tracking solution [closed]