LEAP_geoplugin
This Lasso 9 data type uses the JSON Webservice of http://www.geoplugin.com/ to geolocate IP addresses.
Usage
local(userLocation = LEAP_geoPlugin)
#userLocation->locate(string(client_ip))
#userLocation->currency = 'NZD'
'Your Latitude: '+#userLocation->latitude
'<br />'
'Your Longitude: '+#userLocation->longitude
'<br />'
'currency: '+#userLocation->currency
Public data returned by LEAP_geoPlugin
The code below generates the following output from querying your IP address geo location data.
Note that the CurrencyConverter is based on the default value of "currency" which is CAD.
local(g = LEAP_geoplugin)
#g->locate()
IP address: 64.34.221.224city: Toronto
region: Ontario
areaCode:
dmaCode:
countryCode: CA
countryName: Canada
continentCode: NA
latitude: 43.654700
longitude: -79.362300
currencyCode: CAD
currencySymbol: $
currencyConverter: 0.000000
See http://www.geoplugin.com/webservices/ for more specific details of this free service.