我尝试将带有正确APP_ID,APP_SECRET等的curl请求发送到
https://oauth.vk.com/access_token?client_id=APP_ID&client_secret=APP_SECRET&code=7a6fa4dff77a228eeda56603b8f53806c883f011c40b72630bb50df056f6479e52a&redirect_uri=REDIRECT_URI
我需要从中获取access_token,但需要返回FALSE并curl_error()
打印下一条消息:
60: SSL certificate problem: self signed certificate in certificate chain
我的代码是:
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $url);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
if ( ! $output) {
print curl_errno($ch) .': '. curl_error($ch);
}
// close curl resource to free up system resources
curl_close($ch);
return $output;
当我手动移动到上面的链接时,我会很好地获得access_token。为什么卷曲不起作用?请帮忙。
.crt
扩展证书?但我不知道该如何得到他