我正在尝试连接Facebook For Login,但我不知道为什么我会收到错误。下面是我正在使用的卷曲代码:
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch,CURLOPT_CAINFO, getcwd().'/cacert.pem');
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,10);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT , "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
$result = curl_exec($ch);
但我仍然低于错误:
error: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
我的服务器是带有PHP 5.4的Centos 6.5,下面是Curl版本:
curl 7.44.0(x86_64-redhat-linux-gnu)libcurl / 7.44.0 OpenSSL / 1.0.1e zlib / 1.2.3 c-ares / 1.10.0 libidn / 1.18 libssh2 / 1.6.0
协议:dict文件ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
功能:AsynchDNS IDN IPv6大文件GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets Metalink