SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By trenade
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.

Connection: keep-alive

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

It should be:
Code: Select all
GET /mypage?la=lat&lon=lng HTTP/1.0

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:\r\nUser-agent: netcat\r\n\r\n" | nc 80
By trenade

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
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
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.


TomasTrek: Understood, new topic started at
Last edited by cmatkin on Fri Jan 16, 2009 1:42 pm, edited 1 time in total.
By TomasTrek
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...