dongyang7152 2015-09-04 15:01
浏览 134
已采纳

如何使用php向gps跟踪器发送命令

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 ?

  • 写回答

1条回答 默认 最新

  • douchuang1852 2016-02-07 14:21
    关注

    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/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?