我正在尝试通过 CURL 集成 Aweber,但它总是返回一条消息“电子邮件地址无效”,但如果我将传递给 curl 的相同 url 粘贴到浏览器地址栏中,它可以工作并将我添加到 aweber 列表中。任何人都可以指导我如何通过 curl 使其工作这是我的代码:
$listname = 'sarnia-basic'; // YOUR LIST NAME
$adtracking = 'sarniabusiness'; // AD TRACKING
$url = 'http://www.aweber.com/scripts/addlead.pl?listname=sarnia-basic&meta_adtracking=sarniabusiness&name=Mohammad Tanveer&email=tanveer_411393@hotmail.com&meta_message=1&redirect=http://www.aweber.com/form/thankyou_vo.html';
$ch1 = curl_init( $url );
$options = array(CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERAGENT => 'Mozilla/5.0',
CURLOPT_HEADER => false,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_FAILONERROR => true,
CURLOPT_AUTOREFERER => true,
);
curl_setopt_array( $ch1, $options );
$mh = curl_multi_init();
curl_multi_add_handle($mh, $ch1);
$running = null;
do {
curl_multi_exec($mh, $running);
} while ($running);
$html = curl_multi_getcontent($ch1);
curl_multi_remove_handle($mh, $ch1);
curl_multi_close($mh);