If (("response" in result) & (result.(r) GetRegionCode(countr圜ode, regionName) addon and lang to get more data and translation (leave both blank if you don't need them)Īuto addon = "continent,country,region,city,geotargeting,country_groupings,time_zone_info" Īuto result = ws.lookup(ip, addon, lang) Import ip2locationwebservice : ip2locationwebservice This method returns the web service credit balance in an object. countrygroupingstime zoneinfoolsoncurrent time.numericcodedemonymflagcapitaltotal area.addresstypecategorycontinentnamecodehemispheretranslationscountrynamealpha3 code.This method returns an object containing the geolocation info. QUERY USING THE IP2LOCATION WEB SERVICE Methodsģ input parameters:IP2Location API Key.Package (WS1 - WS25)Use HTTPS or HTTP Writeln("API Version: ", ip2loc.api_version()) Writeln("addresstype: ", results.addresstype) Writefln("elevation: %f", results.elevation) Writeln("mobilebrand: ", results.mobilebrand) Writeln("weatherstationname: ", results.weatherstationname) Writeln("weatherstationcode: ", results.weatherstationcode) Writefln("longitude: %f", results.longitude) ![]() Writefln("latitude: %f", results.latitude) Ip2location ip2loc = new ip2location(db) Īuto results = ip2loc.get_all("8.8.8.8") String db = "./IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-DISTRICT-ASN.BIN" Returns the geolocation information in an object. Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.īelow are the methods supported in this library. Use the IPv4 BIN file if you just need to query IPv4 addresses.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |