那是我的脚本
<?php
$timeout = 10;
$target = "tls://testbed-epp.nominet.org.uk:700";
$result = stream_socket_client($target, $errno, $errstr, 30, STREAM_CLIENT_CONNECT);
if ($result === False) {
throw new Exception("Error connecting to $target: $errstr (code $errno)");
}
echo "Connected";
它抛出一个异常
Error connecting to tls://testbed-epp.nominet.org.uk:700: (code 0)
还有一个警告
WARNING: stream_socket_client(): Failed to enable crypto
同时运行
openssl s_client -connect testbed-epp.nominet.org.uk:700
在终端完美连接。
任何想法将不胜感激