Mam taki formularz:
<?php _e('Username:') ?>
<?php _e('E-mail:') ?>
<?php do_action('register_form'); ?>
<?php _e('A password will be e-mailed to you.') ?>
napisałem taki kod, ale coś mi nie działa:
<?php error_reporting(E_ALL);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://adresstrony/wp-login.php?action=register");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'PHP script');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "user_login=login&user_email=mail");
ob_start(); // prevent any output
curl_exec ($ch); // execute the curl command
ob_end_clean(); // stop preventing output
curl_close ($ch);
unset($ch);
?>
Co poprawic??