In my app, I need to get the favicon.ico from a URL. (eg. "http://google.com/favicon.ico"). Users can input all kinds of URLs, and I need only the domain name.
Examples:
http://drive.google.com/bla/bla/bla -> drive.google.com
www.facebook.com/lol -> www.facebook.com
192.168.0.1 -> 192.168.0.1 (but not really necessary)
Does anyone have a method to get this? Thanks!