- $port = !emptyempty($matches['port']) ? $matches['port'] : ( strtolower($matches['scheme'])=='https' ? 443 : 80 );
中386行
- $fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
替换为
- $contextOptions = array(
- 'ssl' => array(
- 'verify_peer' => false,
- 'verify_peer_name' => false
- )
- );
- //如果有签名的证书
- //$contextOptions = array(
- // 'ssl' => array(
- // 'verify_peer' => true,
- // 'cafile' => '/path/to/cacert.pem',
- // //'CN_match' => 'indexroot.net', // 匹配域名
- // 'ciphers' => 'HIGH:!SSLv2:!SSLv3',
- // 'disable_compression' => true,
- // )
- //);
- $context = stream_context_create($contextOptions);
- $fp = stream_socket_client("ssl://{$host}:{$port}", $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context);
Contact us
青岛
电话:133 9639 4503
地址:青岛市市南区三度空间2309
诸城
电话:133 0646 1744
地址:诸城市繁荣东路74号楼12F