I'm getting a response of invalid-json when I use the test example and the default send option (\ReCaptcha\ReCaptcha($secret)).
\ReCaptcha\RequestMethod\SocketPost() doesn't work on this server (error: Warning: fsockopen(): unable to connect to ssl://www.google.com:443 (Connection timed out)).
\ReCaptcha\RequestMethodCurlPost() just runs and finally quits without a response from the server.
PHP 5.4.28
Linux server
I can post the info.php if needed.
do it like this:
//$recaptcha = new \ReCaptcha\ReCaptcha($secret);
// If file_get_contents() is locked down on your PHP installation to disallow
// its use with URLs, then you can use the alternative request method instead.
// This makes use of fsockopen() instead.
$recaptcha = new \ReCaptcha\ReCaptcha($secret, new \ReCaptcha\RequestMethod\SocketPost());
cheers
Hi @Brather , i've tried it and it gives me error 500... any ideas??
thanks
Closing super old issues. Please re-raise if still relevant.
Most helpful comment
do it like this:
//$recaptcha = new \ReCaptcha\ReCaptcha($secret);
// If file_get_contents() is locked down on your PHP installation to disallow
// its use with URLs, then you can use the alternative request method instead.
// This makes use of fsockopen() instead.
$recaptcha = new \ReCaptcha\ReCaptcha($secret, new \ReCaptcha\RequestMethod\SocketPost());
cheers