I designed a web page with PHP, the data can be read from database including lat, long, speed and it displays the data on a map. I have a MVT380 tracker that I can set IP and port on, so the data through GPRS can be sent to these IP and port.
The problem is how to read the data and save it in database (is there any special hardware that can read the sent data to these IP and port and save it to database? or should we design a web page that can read the data through GET/POST protocol and save it to database?). Is there any other way?
I had exactly the same question: How to receive GPS data from device with PHP?
After a little struggle this is what I got:
For a gps tracker device that sends TCP/UDP data to an ip address and port we really need a server. There will be no POST/GET data. The server will receive data through a port that needs to be decoded. But it was not as complicated as I thought. Even without any knowledge of Java I was able to install a software and manipulate it to my liking.
What I did:
Got a windows server (2012) hosting (6 months for free) so I could try it out. Downloaded opengts and followed their instruction manual exactly. And did not find it hard at all. It worked without having much headache Once I got to the part where everything was working I could play around with the device and it was working fine. Ofcourse we need to know the protocol (the data) that the device is sending and decode so it can be saved in the database.