I have a method named getIP() which returns the clients ip as a string.
How do I use this IP to get the location of the client using this service.
This is how i show the clients IP address.
string IP = getIP();
lblIPAddress.Text = "IP " + IP;
How do i include the clients location in ?
i.e. lblIPAddress.Text = "IP " + IP+ "location" ;)
Below you can find a very simple snippet which I was using to get data from XML endpoint of that API some time ago (I believe there was no changes to the API so it still should work):
This code can be of course improved but I believe it`s a good starting point for you.