Get User Public IP Address

Hello, I was wondering of the best way to get the public IP address of the logged in user.

I want to then pass that IP address to some kind of a web-service to check the user's location and based on that some logic will take place.

Please advise.
Thanks

OriginalPostID-230964

  Discussion posts and replies are publicly visible