\'wp_remote_post\' 是您正在搜索的函数。
$response = wp_remote_post( $url, array(
\'method\' => \'POST\',
\'timeout\' => 45,
\'redirection\' => 5,
\'httpversion\' => \'1.0\',
\'blocking\' => true,
\'headers\' => array(),
\'body\' => array( \'param1\' => \'value1\' ),
\'cookies\' => array()
)
);
if ( is_wp_error( $response ) ) {
$error_message = $response->get_error_message();
echo "Something went wrong: $error_message";
} else {
echo \'Response:<pre>\';
print_r( $response );
echo \'</pre>\';
}