It seems it's possible to extract website title into a row, but how to extract IP address of the host into a row?
So for given any hostname (e.g. webapps.stackexchange.com
) it should return IP address (e.g. 198.252.206.16
).
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityIt seems it's possible to extract website title into a row, but how to extract IP address of the host into a row?
So for given any hostname (e.g. webapps.stackexchange.com
) it should return IP address (e.g. 198.252.206.16
).
Probably it's only possible by using some 3rd party web services which return IP addresses in HTML/XML format, so you can parse it via IMPORTXML.
In the example:
=importxml("http://xml.utrace.de/?query=webapps.stackexchange.com","//ip")
would return 198.252.206.16
.
Here is an example with a dynamic row as an input (e.g. A1):
=importxml("http://xml.utrace.de/?query=" & A1,"//ip")
=importxml("http://xml.utrace.de/?query="&"webapps.stackexchange.com","//ip")
Oct 27, 2014 at 20:29
&
operator:)
I found this works quite well with the following provider:
=importxml("http://freegeoip.net/xml/webapps.stackexchange.com", "//IP")
or dynamically:
=importxml("http://freegeoip.net/xml/" & A1,"//IP")
=REGEXREPLACE(QUERY(IMPORTDATA("http://xml.utrace.de/?query="&A20),
"where Col1 contains 'ip'"), "<ip>|</ip>", "")
=INDEX(IMPORTHTML("https://tools.keycdn.com/geo?host="&A20, "table", 1), 1, 2)