Title: Using Curl as RequestMethod
Last modified: February 28, 2023

---

# Using Curl as RequestMethod

 *  [gjohnsonwp2023](https://wordpress.org/support/users/gjohnsonwp2023/)
 * (@gjohnsonwp2023)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/using-curl-as-requestmethod/)
 * My sysadmin has “allow_url_fopen” disabled on the server for security reason 
   and I’m not able to change this.
 * PHP Warning: file_get_contents(): https:// wrapper is disabled in the server 
   configuration by allow_url_fopen=0 in …
 * I looked through the source and I do see that Curl is available as an option,
   however I don’t see where this can be changed in the configuration.
 * I was able to manually modify the plugin to force Curl to be used, but I’m afraid
   this won’t be upgrade safe.
 * My changes to /wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/
   src/ReCaptcha/ReCaptcha.php (line 144)
 * $this->requestMethod = (is_null($requestMethod)) ? new RequestMethod\Post() :
   $requestMethod;
 * changed to:
 * $this->requestMethod = (is_null($requestMethod)) ? new RequestMethod\CurlPost():
   $requestMethod;
 * —
 * This is called from advanced_google_recaptcha_validate_posted_captcha() in the
   core.php but my PHP knowledge is not enough to figure out how to make this work.
 * Any help or suggestions to make changes that are upgrade safe are much appreciated.
 * Thanks.

The topic ‘Using Curl as RequestMethod’ is closed to new replies.

 * ![](https://ps.w.org/advanced-google-recaptcha/assets/icon-256x256.png?rev=2493018)
 * [Advanced Google reCAPTCHA](https://wordpress.org/plugins/advanced-google-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-google-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-google-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-google-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-google-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-google-recaptcha/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [gjohnsonwp2023](https://wordpress.org/support/users/gjohnsonwp2023/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/using-curl-as-requestmethod/)
 * Status: not resolved