Added ability to retrieve local IP as well as public IP, and added an extra fallback URL.