我想要请求通过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
我推断它没有正确连接但在浏览器上正确返回。哪里有问题?
关于
答案 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