Open blaenk opened 14 years ago
There are WordPress functions that handle some functions of what recaptchalib.php does such as wp_remote_post():
$url = "http://www.google.com/recaptcha/api/verify";
$args = array(
'body' => array(
'privatekey' => $option[ 'private_key' ],
'remoteip' => $_SERVER[ 'REMOTE_ADDR' ],
'challenge' => $_POST[ 'recaptcha_challenge_field' ],
'response' => $_POST[ 'recaptcha_response_field' ]
)
);
$result = wp_remote_post( $url, $args );
Other functions in the library aren't tough to do. It's probably best to avoid the library at this point.
Sounds reasonable.
check to see if the recaptcha library is already loaded before loading it ourselves, perhaps something like
if (!function_exists('some_recaptcha_function')) { require_once('blah'); }