Google搜集得还是非常准确的~~~
POST /loc/json HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: no-cache, no-cache
Pragma: no-cache, no-cache
Content-Length: 106
Content-Type: text/plain
{ "host" : "_null_.localdomain", "radio_type" : "unknown", "request_address" : false, "version" : "1.0" }
测试代码:
C:\Users\Administrator>python
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:1
[MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> r=urllib2.Request("http://www.google.com/loc/json", '{ "host" : "_null_.loca
ldomain", "radio_type" : "unknown", "request_address" : false, "version" : "1.0"
}')
>>> print urllib2.urlopen(r).read()
{"location":{"latitude":30.655556,"longitude":104.0625,"horizontal_accuracy":166
000}}
>>>
我在万人坑公寓测试的结果是30.655556,104.0625成都市中心哈~~~
还有一个是Android里面发现的,地址是http://www.google.com/loc/m/api
过几天我就把谷歌地图Windows Mobile的GMS基站定位原理弄出来看看哈~~现在在考虑是vxSniffer抓包好呢,还是PC架WAP代理网关好。
能提供下怎么把基站转换成经纬度的API吗,谢谢