i wrote a gps-application for the iphone and it all works fine but now i want to send the latitude and longitude to a server over the internet using the most simple way… I have a url from the server in which there are parameters for latitude and longitude. Also i want the lat. and long. to be sent every 90 seconds or so. How exactly is all of this done? Any help is much appreciated, thanks in advance!
Share
handle errors and received data using:
you need some variables set up, such as data, contentLength etc. But this is the general outline for http interaction.
You may want to put all handling stuff in a separate handler class, I changed the delegate to
selfso this is more self-contained.As for timing, use an
NSTimerto invoke posting the data every 90 seconds: