SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By trenade
#57659
Hi guys

I just wanted to know if this is what I do for sending an HTTP GET to my webserver. The following is EXACTLY the string I send out my micro. I haven't yet setup my server so just making sure the GET is correct before trying.

GET/mypage?la=lat&lon=lngHTTP/1.0
www.gpslivetracker.co.za
Connection: keep-alive

Thank you
PS - Do I send "connection" too?
By busonerd
#57686
That request is malformed.

It should be:
Code: Select all
GET /mypage?la=lat&lon=lng HTTP/1.0
Host: www.gpslivetracker.co.za

Why the connection: keep-alive? Do you plan to keep the connection open and send more requests through it? That'll use a lot of power, and airtime.

Also, make sure that you use \r\n at the end of every line, and have a double end of line at the end of your request.

As an example, a test I used in verifying that I had it right for this post was:
Code: Select all
printf "GET / HTTP/1.1\r\nHost: www.sparkfun.com\r\nUser-agent: netcat\r\n\r\n" | nc www.sparkfun.com 80
By trenade
#57717
Hi

Actually the reason I want to keep the connection alive is because Im tracking my vehicle in the event it gets stolen. This means I need to keep doing an HTTP GET to continiously send gps data to my webserver to allow me to view my vehicle in real time.
By bilgun
#57744
hello
i'm bilguun
i've just bought usb eval board(from sparkfun) and gm862-gps. is it possible to receive the gps ? is it nesessery to add a serial port to board additionally? because gps uses two serial port.
By cmatkin
#63548
I was wondering if anyone would know of a script for the webserver that would take posted gps strings and save them to a database.

regards
craig

TomasTrek: Understood, new topic started at
viewtopic.php?p=63635#63635
Last edited by cmatkin on Fri Jan 16, 2009 1:42 pm, edited 1 time in total.
By TomasTrek
#63589
cmatkin, it would have been better for you to start a new topic. Just something to keep in mind next time.

As for your question, it depends entirely on what youre using on your server. Maybe you could let us know what server-side technologies youre using, for example is it PHP?, ASP?, Perl-CGI?, is your database access via MySQL?, MSSQL?, MySQLi? etc...