Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/244.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用CURL(Laravel)传递SSL证书_Php_Laravel_Api_Https_Php Curl - Fatal编程技术网

Php 如何使用CURL(Laravel)传递SSL证书

Php 如何使用CURL(Laravel)传递SSL证书,php,laravel,api,https,php-curl,Php,Laravel,Api,Https,Php Curl,cURL错误35:error:1407742E:SSL例程:SSL23\u GET\u SERVER\u HELLO:tlsv1警报协议版本(请参阅) 我在尝试将数据发送到具有HTTPS的外部网站时遇到此错误。以下是我的代码: 公共静态函数createMessage($recipients,$notification,$\u data) { $data=[ “收件人”=>$recipients, “通知”=>$notification, “数据”=>$\u数据, ]; 返回self::sendR

cURL错误35:error:1407742E:SSL例程:SSL23\u GET\u SERVER\u HELLO:tlsv1警报协议版本(请参阅)

我在尝试将数据发送到具有HTTPS的外部网站时遇到此错误。以下是我的代码:

公共静态函数createMessage($recipients,$notification,$\u data)
{
$data=[
“收件人”=>$recipients,
“通知”=>$notification,
“数据”=>$\u数据,
];
返回self::sendRequest('post','messages',$data);
}
公共静态函数sendFormId($form\u id,$page\u id)
{
$data=数组(
'页面id'=>$page\u id',表单id'=>$form\u id
);
返回self::sendRequest('post',$url,$data);
}
公共静态函数sendRequest($method,$endpoint,$data)
{
$hook=newFBhook($method,$endpoint,$data);
返回$hook->send();
}
fbHook.php
公共函数send()
{
$client=新客户端(['verify'=>false]);
$options=[
'headers'=>数组(
'Authorization'=>'Bearer'.env('FBHOOK\u APP\u TOKEN'),
“环境”=>env('APP_env'),
),
];
如果(计数($this->from_data)){
$options['form_params']=$this->from_data;
}
$method=array_get($this->supportMethodList(),strtolower($this->method),'post');
$full_url=$this->getFullUrl();
$response=$client->{$method}($full_url,$options);
$content=$response->getBody()->getContents();
$content=json_decode($content,true);
$status=array\u get($content,'status',false);
\Log::debug('URL'.$full_URL.'Status'.$Status.'post'..json_encode($options));
返回$status;

日志返回什么?是
$full\u url
返回
https
还是
http
url?@iamab。在日志中,当http没有问题,但我想要的网站在https中返回错误'cURL错误35:错误:1407742E:SSL例程:SSL23\u GET\u SERVER\u HELLO:tlsv1警报协议版本(请参阅“尝试更新cURL