tags:

views:

24

answers:

1

Hi Everyone!

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!

+1  A: 

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

nos
Thank you sir, your advice is much appreciated
Pete Herbert Penito