我正在尝试从网址https://businessenergy.energyhelpline.com/interface/list.php
获得回复
使用wp_remote_post
,但这给我带错误消息
有人可以帮帮我吗?我的代码如下。出现问题:SSL:证书主题名称'* .pure360.com' 与目标主机名'businessenergy.energyhelpline.com'
不匹配
$response = wp_remote_post( 'https://businessenergy.energyhelpline.com/interface/list.php', array(
'method' => 'POST',
'timeout' => 45,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => array( 'email' => 'abc@abc.com', 'mobile' => '9556638896', 'Business' => 'Business', 'FirstName'=>'abc','LastName'=>'abc', 'listName'=> 'SMS MIC & Ener Bus Combined 190912','accName'=>'businessenergy', 'fullEmailValidationInd'=>'Y', 'successUrl'=>'NO-REDIRECT', 'errorUrl'=>'' ),
'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>';
}