I want to post from one WordPress install [SiteA] to another [SiteB] using the http API and cURL.
I have found plenty of JS examples where the auth cookie is loaded into the browser, and then an AJAX call is made from the browser to the API.
I can't find an example doing this from a PHP install using cookies. It should go something like this:
SiteA cURLs SiteB at /wp-login.php and gets a login cookie. Using a user on SiteB's creds. Yes SiteA must therefore be aware of a user on SiteB's plaintext password. I am OK with this.
SiteA stores the login cookie.
SitetA makes another request to SiteB, this time a http POST request containing auth cookies, and a post data form with submission details.
This should be possible right? Anyone know of a code snippet?