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 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭