How To Add IP Address Intelligence Services To Your Apps
Have you ever wanted your apps to have the power to examine an IP address and then find out everything you possibly could about it such as what time zone is local to the IP, what currency they use or what internet service provider is used? This capability is called IP address intelligence and it can add a powerfully rich package of knowledge to your applications allowing you to customize how you present information to your users. In this post you will be learn how to quickly and easily integrate IP address Intelligence into your Delphi desktop and mobile applications. We are going to use a service called IPApi, which is one of the market-leading solutions for all your IP Intelligence requirements in one place. Why would we want to find out information about an IP Address? The IP address is often tied to an individual user. If you know information about that IP address you can customize some of the information, services or even the user interface to better meet the needs of your users. For example, if you find out that the current time for the IP address is night time then you might want to offer different services to those you offer during their daytime hours. Knowing the local currency in use where the IP address is hosted allows you can offer that as a default for purchases. Lastly, you may want or need to restrict some of app’s features if an IP address is located in a different country, possibly for security reasons or to comply with local laws or copyright compliance. With proper IP address intelligence information all of this should be possible. What is the IPApi service? The IPApi service is a powerful IP lookup RESTful web service that helps to find a different set of information using only the IP address. You can do more fascinating things with IP addresses. For instance: Content Personalization based on location Time Zone Lookup Language Redirection based on geolocation Currency and Fraud detection and more The IPApi platform is platform agnostic and offers accurate information. IPApi say their RESTful web service is “trusted by 30,000+ businesses worldwide”. How do I start getting information about an IP address in my application? Head over to the IPApi official website to sign up. There is a Free plan to test it out. IPApi Example Plan Details How do I use IPApi to get information about an IP address? After you sign up, you will have an API access key. And you can utilize that API access key to send requests to the endpoint. Here is an example of calling to the endpoint: And depending on your subscription plan, you get different sets of data in your response: { “ip”: “161.185.160.93”, “type”: “ipv4”, “continent_code”: “NA”, “continent_name”: “North America”, “country_code”: “US”, “country_name”: “United States”, “region_code”: “NY”, “region_name”: “New York”, “city”: “Brooklyn”, “zip”: “11238”, “latitude”: 40.676, “longitude”: -73.9629, “location”: { “geoname_id”: 5110302, “capital”: “Washington D.C.”, “languages”: [ { “code”: “en”, “name”: “English”, “native”: “English” } ], “country_flag”: “http://assets.ipapi.com/flags/us.svg”, “country_flag_emoji”: “🇺🇸”, “country_flag_emoji_unicode”: “U+1F1FA U+1F1F8”, “calling_code”: “1”, “is_eu”: false }, “time_zone”: { “id”: “America/New_York”, “current_time”: “2018-09-24T05:07:10-04:00”, “gmt_offset”: -14400, “code”: “EDT”, “is_daylight_saving”: true }, “currency”: { “code”: “USD”, “name”: “US Dollar”, “plural”: “US dollars”, “symbol”: “$”, “symbol_native”: “$” }, “connection”: { “asn”: 22252, “isp”: “The City of New York” […]
