无法通过curl连接到Adobe上的Adobe连接

时间:2014-02-25 12:14:58

标签: php curl adobe-connect

我想要请求通过curl登录Adobe Connect

$ch = curl_init('https://emea2cps.adobeconnect.com/api/xml?action=login&login=nurgasemetey@gmail.com&password=D742455B61/');
curl_exec($ch);
$info= curl_getinfo($ch);
echo 'passed' . $info['total_time'] . ' secconds ' . $info['url'] . '------ and http-code'. $info['http_code'];
curl_close($ch);

但是响应是这样的

 passed 0.078 seconds https://emea2cps.adobeconnect.com/api/xml?action=login&login=nurgasemetey@gmail.com&password=D742455B61/------ and http-code 0

我推断它没有正确连接但在浏览器上正确返回。哪里有问题?

关于

1 个答案:

答案 0 :(得分:1)

添加此参数

curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);

代码......

<?php
$ch = curl_init('https://emea2cps.adobeconnect.com/api/xml?action=login&login=nurgasemetey@gmail.com&password=D742455B61/');
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_exec($ch);
$info= curl_getinfo($ch);
echo 'passed' . $info['total_time'] . ' secconds ' . $info['url'] . '------ and http-code'. $info['http_code'];
curl_close($ch);

<强> OUTPUT :

passed5.922 secconds https://emea2cps.adobeconnect.com/api/xml?action=login&login=nurgasemetey@gmail.com&password=XXXXXX/------ and http-code200