How can I use R to login to a web site and perform some action? I think the code below is very close, but something seems to be off here.
library(httr)
library(XML)
handle <- handle("http://subscribers.footballguys.com")
path <- "amember/login.php"
# fields found in the login form.
login <- list(
amember_login = "username"
,amember_pass = "password"
,amember_redirect_url =
"https://www.google.com/accounts/Login"
)
THEN
response <- POST(handle = handle, path = path, body = login)
Any insight into this would be most appreciated.