Differences
This shows you the differences between two versions of the page.
geoip:api [2010/01/08 21:32] mauayan |
geoip:api [2010/01/09 01:11] (current) mauayan |
||
---|---|---|---|
Line 22: | Line 22: | ||
==== Locate Method ==== | ==== Locate Method ==== | ||
- | Methods to for locating by IP | ||
- | |||
- | === locate === | ||
<code>geoip.prototypeapp.com/api/locate</code> | <code>geoip.prototypeapp.com/api/locate</code> | ||
Line 38: | Line 35: | ||
The response should look like: | The response should look like: | ||
<code> | <code> | ||
- | 'ip' => %ip, | + | { |
- | 'timestamp' => %timestamp_in_milliseconds, | + | "ip":"69.163.181.149", |
- | 'location' => array( | + | "timestamp":1263028293112, |
- | 'coords' => array( | + | "location": { |
- | 'latitude' => %latitude, | + | "coords": { |
- | 'longitude' => %longitude | + | "latitude":"33.9269", |
- | ), | + | "longitude":"-117.861" |
- | 'address' => array( | + | }, |
- | 'city' => %city, | + | "address": { |
- | 'country' => %country, | + | "city":"Brea", |
- | 'country_code' => %country_code, | + | "country":"United States", |
- | ), | + | "country_code":"US" |
- | 'gmtOffset' => %gmtOffset, | + | }, |
- | 'dstOffset' => %dstOffset | + | "gmtOffset":"-8", |
+ | "dstOffset":"-7" | ||
+ | } | ||
+ | } | ||
</code> | </code> | ||