Wordpress wp_remote_post

后端 未结 1 1742
谎友^
谎友^ 2021-01-14 08:06

I want to use wp_remote_post to send information from one server to my other website.

So basically, I have added this line to my code -

$sidebarHTTP          


        
相关标签:
1条回答
  • 2021-01-14 08:28

    You will need to enable cURL in your php.ini file.

    wp_remote_post() uses a class called WP_Http that in turn can use one of three transport classes (see file class-http.php function _get_first_available_transport).

    POST method will work with class WP_Http_Curl, but will not work with class WP_Http_Streams (the cURL fallback).

    The alternative is to use wp_remote_get()

    0 讨论(0)
提交回复
热议问题