IP2Location.Component oIP2Location = new IP2Location.Component() IP2Location.IPResult oIPResult = new IP2Location.IPResult() Private string QueryIP2Location( string strIPAddress) We will just show how to create and call the components.įirst, create the QueryIP2Location function below will accept an IP address and output the geolocation results. In your Visual Studio project, go to the NuGet Package Manager and install the 2 NuGet packages below: Both databases are free for use with attribution required.ĭownload the free IP2Location LITE DB11 data:ĭownload the free IP2Proxy LITE PX8 data:Īfter downloading both zipped files above, you need to extract out their respective BIN files and copy them to a folder somewhere, e.g. NET Framework 4.61 or later.įirst of all, you need to download the free IP geolocation BIN databases for both the IP2Location and the IP2Proxy data. We will assume you already have a version of Microsoft Visual Studio that is capable of handling. Microsoft Visual Studio to compile the codes. Developers can use the geolocation information to deliver business requirements such are pages redirection and fraud prevention. In this tutorial, we will show how to input an IP address and get back IP geolocation & proxy data using IP2Location library. Difference between Hashtable and Dictionary.How to write file using StreamWriter in C#?.How to sort the generic SortedList in the descending order?.Difference between delegates and events in C#.How to read file using StreamReader in C#?.How to calculate the code execution time in C#?.How to sort object array by specific property in C#?. ![]() How to remove duplicate values from an array in C#?. ![]() How to get a comma separated string from an array in C#?.Difference between String and string in C#.How to combine two arrays without duplicate values in C#?.How to convert date object to string in C#?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |