GPS 信息发送到端口 5556

发布于 2024-09-08 16:30:55 字数 290 浏览 1 评论 0 原文

我不确定这是否与本网站相关,如果不是,我深表歉意。

我有一个 GPS 设备,它通过端口 5556 将其坐标传输到我的服务器。我知道它成功地做到了这一点,因为我安装了 netcat 并监控了这个端口,它确实返回了一个字符串。

如何捕获返回的内容并通过 PHP 使用它?我想我也许可以使用 AJAX 执行 shell_exec netcat,然后将返回的任何内容分配给字符串,但是这有几个问题,特别是字符串返回可能需要长达 60 秒的时间。我是否以错误的方式处理这个问题?也许有工具可以监听 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.

How can I capture whats returning and utilize it via 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. Am I going about this the wrong way? Perhaps there's tools to listen to 5556 and then return it? Any advice would help Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷路的信 2024-09-15 16:30:55

如果您的 GPS 设备受 gpsd 支持,您最好进行设置。源代码发行版还附带了一个 PHP 示例,您可以在 http://git.berlios.de/cgi-bin/cgit.cgi/gpsd/tree/gpsd.php

If your gps device is supported by gpsd you're best off setting up that. 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文