You must use a web service for getting the IP. See: https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript