Hello,
I Need a TCP / IP Port Listener on my centos VPS Hosting to receive gps tracker signals on ports and store in mysql db.

For further processing of received stored data, we are working on a php mysql application, but to listen to port signals, which programming language is the best option on centos, linux?

Also, if you can show me a ready code for the same, that will be helpful. Also, let me know, what to take care of why working on such a solution.

I have a dedicated IP, a VPS Hosting and port numbers 1701 to 1800 open on my server, is that all? and do I need anything else to make such a solution?

Thanks in advance.

Recommended Answers

All 10 Replies

Hey,
Just a quick suggestion, instead of using a TCP program, using sockets that require it to be up all the time, and not breaking, why don't you use something as robust as apache todo all that hard work for you?

For example, I would use a php page. addtrack.php?auth=user:password&gpsdata=NMEA string.

There are plenty of classes in PHP to dissect NMEA statements, or you could just use PHP to put it straight into the database as a whole line.

But yeah, as stated before, you would need to rely on the server written functioning. And it's stability. Instead of something with alot of backing.

But if you still wish to do this with a server/port, I recommend the use of C++.

Unfortunately I do not have a working solution in c++ for you as my strong point is PHP.

Just so you know, I have done something similar for fleet management. Had a Windows Mobile device reporting to a PHP script with NMEA sentences, Displayed on Google maps. I am sure I can find all the source for that if you would like me to send it your way.

Just a quick thought.
Nick

Hello
Thanks a lot i got the solution......

Hey,
Just a quick suggestion, instead of using a TCP program, using sockets that require it to be up all the time, and not breaking, why don't you use something as robust as apache todo all that hard work for you?

For example, I would use a php page. addtrack.php?auth=user:password&gpsdata=NMEA string.

There are plenty of classes in PHP to dissect NMEA statements, or you could just use PHP to put it straight into the database as a whole line.

But yeah, as stated before, you would need to rely on the server written functioning. And it's stability. Instead of something with alot of backing.

But if you still wish to do this with a server/port, I recommend the use of C++.

Unfortunately I do not have a working solution in c++ for you as my strong point is PHP.

Just so you know, I have done something similar for fleet management. Had a Windows Mobile device reporting to a PHP script with NMEA sentences, Displayed on Google maps. I am sure I can find all the source for that if you would like me to send it your way.

Just a quick thought.
Nick

Hello
Thanks a lot i got the solution......

Hi aruti,
I need a solution to port listener and redirect data to a PHP script. What way out did you use?

Regards,
Luis Berumen

Hello

i am also looking for a linux programm that listens to a specific port and parses the data that arrives

here a sample
$357248013730811,1,1,140708,090221,E12126.3740,N3111.1328,48.2,07,1,0

the parsed data should be saved into a mysql database.

thanks
marco

Hello Aruti,

I need you help as my problem is absolutely similar to yours. Since you have found teh solution, please guide me.

I have a GPS device that sends data to a specified IP address and port. Both of these fields are reconfigurable. I have a virtual dedicated hosting which gives me static IP and a few ports. What do I need to install at the server to make it listen to the GPS data.

Once I receive it at the server, i can put it in DB using PHP or some scripts and generate KML files for Google Earth/Maps. But I need to get the data first. please help.


Ritesh

Hi Aruthi,
I'm also having the same problem. how did you solve that problem?

I also need this solution. Can anyone please help, I have a TCP/UDP device that sends IP or DNS. I need php to listen to the incoming data and insert into mysql.

Any help will be great.

Im trying to do this also. Is php reliable to do this? I have a device that sends ContactID signals (Alarm communication format ) to a IP and whatever ports I specify.

I need to listen to the data and store it into a db.

Any help would be awesome!

I found a few examples on google, Il test and get back

Hey,

Did anyone get a solution for receiving data from the gps tracker to the server? If yes please help.

Regards,
Sharath Mohan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.