michelefaccini
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Developing with WordPress
In reply to: Rest APINow next step for me is to login in automatically my users to WordPress as they are logged in to my site.
Forum: Developing with WordPress
In reply to: Rest APIThe following seems to work :
/* register user to WordPress */ $json_string_data = '{"username" : "'.$usrnm. '", "password" : "' . $password . '", "email" : "' . $email . '"}'; $ch = curl_init('http://www.michelefaccini70.no-ip.org/sito2/Wordpress/?rest_route=/wp/v2/users/register'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $json_string_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($json_string_data)) ); $result = curl_exec($ch);- This reply was modified 7 years, 5 months ago by michelefaccini.
- This reply was modified 7 years, 5 months ago by bcworkz. Reason: code fixed
Forum: Developing with WordPress
In reply to: Rest APIThanks a lot…it works ! Now next step for me is to register automatically my users to WordPress as they register to my site.I installed WP REST User plugin (see the following link : https://ww.wp.xz.cn/plugins/wp-rest-user/) and now I have to figure out how to use it (not a programmer…).
- This reply was modified 7 years, 6 months ago by michelefaccini.
Forum: Developing with WordPress
In reply to: Rest APII’m making the GET request against the URL so http://www.michelefaccini70.no-ip.org/sito2/Wordpress/wp-json/v2/posts/
It is my own server and I am using :
cURL Information 7.19.7
SSL Version GnuTLS/2.8.6OpenSSL Library Version OpenSSL 1.0.2g 1 Mar 2016
OpenSSL Header Version OpenSSL 1.0.2g 1 Mar 2016- This reply was modified 7 years, 6 months ago by michelefaccini.
Viewing 5 replies - 1 through 5 (of 5 total)