Function call
$hole = fsockopen("https://217.ххх.ххх.ххх:81/History/HistoryService.asmx", 81, $errno, $errstr, 10);
leads to an error
(Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?)
Question: where is the support of the https protocol in the socket configured, contact the provider or do you need to make some settings in your files?