# NOT RUN {
##
# }
# NOT RUN {
host(
ipv4(
c("127.0.0.1")
)
)
# }
# NOT RUN {
##
h <- host(c(
"icann.org", "iana.org"
))
##
host(ipv4(h))
##
## Domain names internationalization
##
##
## results may vary according to the (POSIX) platform
host(c("bucher.de", "B<U+00FC>cher.de"))
##
dn <- c(
enc2utf8("b<U+00FC>cher.de") ## ensure UTF-8
## cannot input emoji with Latex and "\u1f4a9" does not work either in R
, rawToChar(as.raw(c(0xf0, 0x9f, 0x92, 0xa9, 0x2e, 0x6c, 0x61)))
)
##
Encoding(dn) <- "UTF-8"
##
dn
## enforce internationalization with different options
flags <-rep( c( "IDNA_DEFAULT" , "IDNA_ALLOW_UNASSIGNED"), each = length(dn))
##
dni <- toIdna( dn, flags)
##
host(dni)
# }
# NOT RUN {
## French country-code top-level domains (ccTLD)
tld <- whois(
c(
"fr", "re", "tf", "wf", "pm", "yt"
, "nc", "mq"##, "gp", "gf"
, "pf"
)
, verbose = 1
, output = 0
)
##
sapply(tld, function(x)names(x))
# }
# NOT RUN {
##
##
##
rhost <- host('r-project.org')
## hostname : "cran.wu-wien.ac.at"
rhost.hnm <- host.info(ipv4(rhost))
## primary domain : "ac.at"
fqdn(rhost.hnm)
## ARIN
ipv4.rir()[ip.match(ipv4(rhost), ipv4.rir())]
##
ip.match(ipv4(rhost), ipv4.recovered())
## domain name info
rdom.wh <- whois('r-project.org', output=1)
## "AT"
rdom.wh[['r-project.org']]['Registrant Country']
## host
rhost.wh0 <- whois(ipv4(rhost),verbose = 2, output=1)
# }
Run the code above in your browser using DataLab