fsockopen doesn’t want to connect over https

Function call

$hole = fsockopen("https://217...:81/History/HistoryService.asmx", 81, $errno, $errstr, 10);

leads to error

(Unable to find the socket transport “https” – did you forget to enable it when you configured PHP?)

Question: where is the https protocol support configured in the socket, should I contact the provider, or do I need to make some settings in my files?


Answer 1, authority 100%

fsockopen()

hostname
If OpenSSL support is installed, you may prefix the hostname with either ssl:// or tls:// to use an SSL or TLS client connection over TCP/IP to connect to the remote host.

$hole = fsockopen("ssl://217...", 81, $errno, $errstr, 10);

Of course, OpenSSL must be installed


Answer 2, authority 50%

um … you finally wrote nonsense.
If you want to get content at this address then use

file_get_contents("https://217...:81/History/HistoryService.asmx");

If you need to connect via sockets, then you need to write:

$hole = fsockopen("217...", 81, $errno, $errstr, 10);