Question

Je souhaite faire une demande de connexion sur Adobe Connect via curl

$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);

Mais la réponse est comme ça

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

J'en déduis qu'il ne se connecte pas correctement mais que le navigateur renvoie correctement.Où peut-il y avoir un problème ?

Cordialement

Était-ce utile?

La solution

Ajouter ce paramètre

curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);

Le code...

<?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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top