Description Usage Arguments Value See Also Examples
takes in a vector of hostnames and returns the IP addresses from each hostname's DNS entries. Compatible with both IPv4 and IPv6 addresses.
1 | hostname_to_ip(hostnames)
|
hostnames |
a vector of hostnames. |
a list the length of hostnames
, containing the IP addresses from
each hostname's DNS entries. In the event that a hostname cannot be resolved,
the list element will consist of a length-1 character vector containing
"Not resolved".
ip_to_hostname
for the opposite functionality - resolving
IP addresses to their associated hostname(s) - and ip_to_numeric
for converting IP addresses retrieved from hostname_to_ip
into their
numeric representation.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# One hostname
hostname_to_ip("dds.ec")
## [1] "162.243.111.4"
# Multiple hostnames
hostname_to_ip(c("dds.ec","ironholds.org"))
#[[1]]
#[1] "162.243.111.4"
#[[2]]
#[1] "104.131.2.226"
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.