Skip to content

MilkRen/Location-by-IPv4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Location-by-IPv4

Hello, in this application I made finding the location by IPv4 using the API - ipwho.is

With this API, you can get the location of the city, village, find out the provider (you can look at the official API website to get acquainted with the functionality and edit code it for yourself).

Regex is used for the main cases, and the rest is cosmetic. Comments have been added to some points to make it clear. Use it, learn it! Criticism is welcome!)

 str = wc.DownloadString($"http://ipwho.is/{textBoxInputIP.Text}"); // API
            
match = Regex.Match(str, "\"country\":\"(.*?)\",(.*?)\"region\":\"(.*?)\",(.*?)\"city\":\"(.*?)\",\"latitude\":(.*?),\"longitude\":(.*?),(.*?)\"domain\":\"(.*?)\"},\"(.*?)\","); //(.*?) - I find missing elements in the specified deopazon

Framework

Social:

About

Determination of location, domain, etc. by IP | WinForms

Topics

Resources

Stars

Watchers

Forks

Languages