I'm trying to get the current location of my computer from Google's BrowserLocation API.
How to create a script to query Google Browserlocation: This thread helped me construct the script, but one problem remains: the accuracy is way off when using curl from the command line: "accuracy" : 11178
. Bafflingly, if I copy-paste the same address in my browser, the returned JSON is perfectly fine with an accuracy of "accuracy" : 52
.
What could the crucial difference be, and how do I modify the curl script to work like my browsers do? There is JSON, CURL and Google's geolocation this previous thread with what appears to be a similar issue, but the solution posted does not help me.
I have Wireshark, and a capture of the two methods of accessing the API. I am currently trying to figure out how to retrieve the relevant packets for inspection. If anyone can help me with this intermediate step, that would be most welcome.
Well I got it to work. The issue was that I didn't URL escape the names of the access points. Look here for how to do this with Perl.