Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8366931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:02:13+00:00 2026-06-09T13:02:13+00:00

I would like to login into a WordPress website using R’s RCurl package in

  • 0

I would like to login into a WordPress website using R’s RCurl package in order to install a WordPress plugin (probably use postForm on some options pages in WordPress). Since the website is password protected, I ask for your help in how to authenticate my R session.

I found the following three links relevant, but do not know how to use them for WordPress:

  • login to mediawiki using RCurl
  • Login WordPress using HttpWebRequest
  • http://r.789695.n4.nabble.com/RCurl-HTTP-Post-td3311942.html

Any suggestions?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:02:15+00:00Added an answer on June 9, 2026 at 1:02 pm

    I’ve dealt with something similar using REDCap – might be useful for you too. This short example shows how I used the REDCap API to grab data.

    library(RCurl)
    out <- postForm("https://redcap.url.org/redcap/api/",
                     token="INSERT TOKEN HERE",
                     content="record",
                     type="flat",
                     format="csv",
                     .opts=curlOptions(ssl.verifypeer=FALSE))
    write(out,file="C:/wherever/out.csv")
    

    Note that this doesn’t do proper checking for SSL – I’ve improved that in later versions. The more lengthy explanation is on my Google+ profile: https://plus.google.com/106259574970597769926/posts/U3fVCTV4EdQ

    It looks like you can use cURL to log into WordPress by passing the right parameters, as described here:
    http://w4dev.com/wp/login-into-wp-using-curl/

    It looks like the URL in question is http://localhost/wordpress/wp-login.php and the parameters that matter can be found at the page above. Basically, you need to define the user, their password, and where you want to redirect them to on the site afterwards. These are how the parameters are described in that PHP example

    "log=". $login_user .
    "&pwd=" . $login_pass .
    "&wp-submit=Log%20In&redirect_to=" . $visit_url;
    

    Basically, it’s just constructing a string to post, which looks something like:

    http://yourwordpress.fake/wp-login.php?log=trehman&pwd=abc123456&wp-submit=Log%20In&redirect_to=http://yourwordpress.fake/pageyouwant
    

    So, you could just change the postForm above to have a different URL and parameters, and it should get you authenticated and then redirect you to the page you want. I’m not an expert here, but I’m pretty sure that you can redirect to another long URL with parameters, which would let you “submit” a form or something similar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to integrate Facebook into an application - enable login using Facebook
How can I login programmatically into Sitecore? For example if you would like to
net website, i would like to implement forget password. I am using following steps
I would like to know how to share a session between my website non-wordpress
I would like to use the linkedin javascript API as a way to login
I would like to allow a user to automatically login if they use their
I would like to know how does the login procedure work in the Internet
I would like to redirect visitors to a login page with added parameters (based
I would like to be able to add a new SQL LOGIN and name
When 'login' button is clicked I would like to iterate through a column in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.