简体   繁体   English

GPS信息已发送到端口5556

[英]GPS Info Sent to port 5556

I'm not sure if this is relevant to this site or not, if not I apologize. 我不确定这是否与此网站有关,如果不对不起,我对此表示歉意。

I have a GPS device that's transmitting its coordinates to my server on port 5556. I know that its succeeding at doing this because I installed netcat and its monitoring this port, it does return a string. 我有一个GPS设备正在将其坐标传输到端口5556上的服务器。我知道它能够成功完成此操作,因为我安装了netcat并监视此端口,但它确实返回了字符串。

How can I capture whats returning and utilize it via PHP? 如何捕获返回的内容并通过PHP使用它? I was thinking I could perhaps use AJAX to do a shell_exec netcat and then assign whatever returns to a string, but there are a couple issues with this, specifically it could take up to 60 seconds for a string to return. 我当时想我也许可以使用AJAX来做一个shell_exec netcat,然后将任何返回值分配给一个字符串,但是这样做有几个问题,特别是字符串返回可能要花费60秒。 Am I going about this the wrong way? 我会以错误的方式处理吗? Perhaps there's tools to listen to 5556 and then return it? 也许有工具可以听5556然后返回它? Any advice would help Thank you! 任何建议都会有所帮助,谢谢!

If your gps device is supported by gpsd you're best off setting up that. 如果gpsd支持您的gps设备,则最好进行设置。 The source distribution comes with a PHP sample as well, you can see the source at http://git.berlios.de/cgi-bin/cgit.cgi/gpsd/tree/gpsd.php 源代码发行版还附带了一个PHP示例,您可以在http://git.berlios.de/cgi-bin/cgit.cgi/gpsd/tree/gpsd.php上查看源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM