Hi ,
I want to capture the data being posted by a GPS device using PHP . The data being posted by the device is not having http headers and consist of a data which is like
>demo,13,19.256645,72.871895,1132.119995,|,19.256643,72.871902,1132.020020,0.157,0,10,0,255,255,255,47.9M,0.43,04B3,7383,0842,45,255,404,92,23,7383,1203,00,00,255<
I tried to capture this data using $_SERVER['REQUEST_METHOD']; but it returns nothing .
please find attached a java application which can be used to simulate the scenario . If i use a java based application i was able to get the device communication well both from the device as well as the attached java program.
I want to know how can i listen to the communication from the device using which method .
Thanks
Aditya
Capture gps data using php
Moderator: General Moderators
-
adityasinha
- Forum Newbie
- Posts: 1
- Joined: Tue Mar 01, 2011 10:47 am
Capture gps data using php
- Attachments
-
- EchoClient2.zip
- java source code and class file
- (1.93 KiB) Downloaded 44 times
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Capture gps data using php
Can you make it have HTTP headers? If it doesn't, I don't think it qualifies as "post". POST is a part of the HTTP protocol. Otherwise you'll have to listen to the socket yourself.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Capture gps data using php
Indeed. You either need to make a PHP daemon run in the background which creates a socket and listens on a specific port (besides port 80), otherwise have your java class create a properly formed HTTP request.Jonah Bron wrote:Can you make it have HTTP headers? If it doesn't, I don't think it qualifies as "post". POST is a part of the HTTP protocol. Otherwise you'll have to listen to the socket yourself.