Hello,
I am relatively new to Shiny and I would also like to have a poll feature. I have found an answer from Joe Cheng to a post from Dong Shichao (records, 27/7/2013).
Here is what I have tried:
in ui.R:
h3("URL components"),
verbatimTextOutput("urlText")
in server.R:
output$urlText <- renderText({
paste(sep = "",
"protocol: ", session$clientData$url_protocol, "\n",
"hostname: ", session$clientData$url_hostname, "\n",
"pathname: ", session$clientData$url_pathname, "\n",
"port: ", session$clientData$url_port, "\n",
"search: ", session$clientData$url_search, "\n",
"IP address XFF: ", session$request$HTTP_X_FORWARDED_FOR, "\n",
"IP address: ", session$request$REMOTE_ADDR
)
})
I have obtained an IP address in session$request$REMOTE_ADDR, but it is not my IP address. It looks like a phony address.
Claude