Get your public IP
Using the ipify
API by Rdegges
ipify
is available through both CRAN and GitHub:
To install the CRAN version:
install.packages("ipify")
To install the latest development version from GitHub:
install.packages("devtools")
devtools::install_github("gregce/ipify")
You can see the package in action at http://gregce.github.io/ipify/
library(ipify)
get_ip()
get_ip(format="json")
get_ip(format="jsonp")
## [1] "73.162.222.85"
## $ip
## [1] "73.162.222.85"
##
## [1] "callback({\"ip\":\"73.162.222.85\"});"