开发者

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.

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!


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜