Page 1 of 1

PHP to obtain GPS information upon "Submit"

Posted: Tue Mar 23, 2010 2:46 pm
by shauntdergrigorian
Is it possible to acquire GPS information (coordinates, location) of mobile devices through PHP? I'm looking to save locations of friends who submit information onto my php site (with their permission of course). Any suggestions?? I'm still relatively new to PHP so please be patient with me. Thanks a million

Re: PHP to obtain GPS information upon "Submit"

Posted: Tue Mar 23, 2010 3:51 pm
by onion2k
It's not possible with PHP, but it is with Javascript on a browser that has the geolocation features enabled (most smartphones do). I had a play with it some time ago and found it was pretty good. Have a look at the source of this page http://ooer.com/geo/ to see what I came up with.

Remember though, the user will always be asked if they want to share their location info. There's no way around that.

Re: PHP to obtain GPS information upon "Submit"

Posted: Tue Mar 23, 2010 4:54 pm
by shauntdergrigorian
Thank you so much for your reply. That's fine, I can use javascript. Is there a name for this feature? Thanks again, you've helped me significantly