cURL停止工作了。我开始收到这个错误(直到几个小时前它都工作得很好)。
我正在使用PHP的cURL扩展。我找到了一些curl命令行的解决方案,但不幸的是我不理解它们:/并且我不知道如何将它们移动到PHP cURl标志中。
cURL配置:
$curl=curl_init();
curl_setopt($curl, CURLOPT_URL, "https://pln.bitcurex.com/data/ticker.json");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSLVERSION, 3);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, $this->useragent);
curl_setopt($curl, CURLOPT_VERBOSE, 0);
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_HTTPHEADER, $this->headers);
if(substr($url, 0, 5)=='https') curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
if($this->ciastko)
{
curl_setopt($curl, CURLOPT_COOKIEJAR, $this->ciastko);
curl_setopt($curl, CURLOPT_COOKIEFILE, $this->ciastko);
}
if($this->post)
{
if( is_array($this->post) && count($this->post) > 0 )
{
$postdata = http_build_query($this->post,'','&');
}
elseif( is_string($this->post) )
{
$postdata = $this->post;
}
else $postdata = '';
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
}
$wynik=curl_exec($curl);
错误:
35: 错误:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
有什么办法可以修复这个问题吗?