$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$api);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//禁止直接显示获取的内容 重要
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //
$json = curl_exec($ch); //获取
curl_close($ch);