php – How to debug fsockopen?-ThrowExceptions

Exception or error:

How can I understand the error when trying to open a socket?
I get error 0, however all SSL certificate works fine.

$fp = fsockopen("ssl://", 443, $errno, $errstr);
if (!$fp) {
    echo "ERROR: $errno - $errstr<br />\n: " . $errno;
} else {


ERROR: 0 –
: 0

But it works when I try to open the socket with myself.

Maybe there is some script that will allow you to get at least some error?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *