The IP2Location database has over 99.5 accuracy in country level detection and >75 of accuracy in city level. Print("Mobile Carrier : " + rec. The IP2Location is supporting 249 countries as recognized in ISO 3166. Print("Weather Station Name : " + rec.weather_name) Print("Weather Station Code : " + rec.weather_code) Print("Country Name : " + rec.country_long) This is a IP2Location Pascal Library that enables the user to find the country, region, district, city, latitude, longitude, zip code, time zone, ISP, domain. Print("Country Code : " + rec.country_short) Step 1: Download IP2Location LITE database DB11 LITE for further information. It has been optimized for speed and memory utilization. Free databases are available for download at IP2Location LITE database. This IP Geolocation Python Library supports all IP2Location IP database products. # database = IP2Location.IP2Location(os.path.join("data", "IPV6-COUNTRY.BIN"), "SHARED_MEMORY")ĭatabase = IP2Location.IP2Location(os.path.join("data", "IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-DISTRICT-ASN-SAMPLE.BIN")) In this tutorial, we use the IP2Location LITE database to lookup country of origin from the visitor’s IP address. WARNING: Please make sure your system have sufficient RAM to use this feature. Cache the database into memory to accelerate lookup speed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |