uses stream_socket_client instead of fopen
This commit is contained in:
parent
c218aebaae
commit
283f76540a
|
@ -174,9 +174,9 @@ class LetsEncrypt
|
||||||
public function getCertificate($domain)
|
public function getCertificate($domain)
|
||||||
{
|
{
|
||||||
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
|
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
|
||||||
$read = fopen("https://" . $domain, "rb", false, $stream);
|
$read = stream_socket_client("ssl://" . $domain . ":443", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $stream);
|
||||||
$cont = stream_context_get_params($read);
|
$cont = stream_context_get_params($read);
|
||||||
|
|
||||||
return $cont;
|
return $cont;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue