Verbesserungsvorschlag: Allow CURL connections
-
Hey there,
Thanks for this wonderful plugin! I do not have a support request but a suggestion for improvement.
On one of my client’s sites we were unable to use the plugin because it gave
connection-failed
andhostname-mismatch
errors. A bit of debugging then provided the answer. By default, the plugin uses thefile_get_contents
function to retrieve the appropriate ReCaptcha URL and then validate it. Unfortunately, sometimes the PHP flagallow_url_fopen
is set to false, causingfile_get_contents()
to fail.It would be great if you could add a checkbox in the settings to allow the user to switch to CURL. All you would have to do is change line
206
ininc/core.php
from$captcha_obj = new \ReCaptcha\ReCaptcha( $secret_key );
to
$captcha_obj = new \ReCaptcha\ReCaptcha( $secret_key, new \ReCaptcha\RequestMethod\CurlPost() );
Thank you!
- The topic ‘Verbesserungsvorschlag: Allow CURL connections’ is closed to new replies.