1

I'm trying to develop php based tracking software for my gps tracker gps107.

My tracker has GPRS and I have successfully associated my tracker with open source tracking software "Traccar" which is written in java and located in my server.

But now I want to develop my own custom software for my needs in php.

I also have the protocol manual where I can see available commands and their responses.

example command for locating:

server -> device

**,imei:359586018966098,100 

device -> server imei:353451044508750,001,0809231929,,F,055403.000,A,2233.1870,N,11354.3067,E,0.00,,;

How can I send these commands with php ?

4
  • Although I'm not positive, I believe you want to send using UDP Commented Sep 4, 2015 at 15:14
  • That may be the case because the tracker supports tcp and udp. Commented Sep 4, 2015 at 15:37
  • @MulOnPomm were you able to achieve this? I also want the same thing. Commented Feb 6, 2016 at 13:54
  • Look my added answer. Commented Feb 7, 2016 at 14:21

1 Answer 1

2

The communication between server and a device is made with UDP or TCP protocol. To make this type of a connection with PHP you have to create PHP socket server. Then you assign server IP and port to your device, and the device will connect to the server as a client. After that you can receive and send commands.

PHP Doumentation about sockets: http://php.net/manual/en/book.sockets.php Excample socket server: http://devzone.zend.com/209/writing-socket-servers-in-php/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.