使用下面的PHP脚本,我收到“连接失败”消息。
我在API密钥的帐户设置中按ENABLE是否正确?
<?php
echo "testing" ;
$api_key = "......";
$list_id = "a45e802adf";
require('src/Mailchimp.php');
$Mailchimp = new Mailchimp( $api_key );
$Mailchimp_Lists = new Mailchimp_Lists( $Mailchimp );
$subscriber = $Mailchimp_Lists->subscribe( $list_id, array( 'email' => "testing@yahoo.de" ) );
if ( ! empty( $subscriber['leid'] ) ) {
// Success
}
?>
致命错误:带有消息的未捕获异常'Mailchimp_HttpError' '对列表/订阅的API调用失败:无法连接到 us3.api.mailchimp.com端口443:拒绝连接' C:\ xampp \ htdocs \ xampp \ src \ Mailchimp.php:221堆栈跟踪:#0 C:\ XAMPP \ htdocs中\ XAMPP \ SRC \ Mailchimp \ Lists.php(743): Mailchimp-&gt; call('lists / subscribe',Array)#1 C:\ XAMPP \ htdocs中\ XAMPP \ tochimp.php(14): Mailchimp_Lists-&gt;订阅('a45e802adf',数组)#2 {main}抛出 第221行的C:\ xampp \ htdocs \ xampp \ src \ Mailchimp.php