jjzjj

imapProtocols

全部标签

php - fsockopen,连接 ssl ://imap server 时证书验证失败

我正在尝试使用fsockopen()通过php脚本连接到ssl://imapServer:CentOSLinuxrelease7.1.1503Apache:Apache/2.4.6PHP:PHP5.6.17$host="ssl://mail.example.com";$port=993;echo"Connectingwith".$host."oport".$port;$socket=fsockopen($host,$port,$errno,$errstr,30);if(!$socket){echo"Connectionfailed";}$line=fgets($socket);retu