How to send Curl request or to find an analogue, if Curl is disabled on the host?

Comrades, again I had to come for help to the great minds of the Toaster. In General, I was faced with a vexing problem, I have one script that is tied to the hosting license hosting I liked, but now I need to connect a payment API from Yasha and what was my surprise that the server denied Curl.
Is it possible to send this request via file_get_contents() or something else, help please ?

The code itself:
$curl = curl_init($uri);
 $headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8;';
 if ($this->accessToken)
 $headers[] = 'Authorization: Bearer' . $this->accessToken;
 curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
 curl_setopt($curl, CURLOPT_USERAGENT, self::YM_USER_AGENT);
 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
 curl_setopt($curl, CURLOPT_TIMEOUT, 80);
 curl_setopt($curl, CURLOPT_POST, true);
 curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
 curl_setopt($curl, THIS, true);
 curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, true);
 curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/../data/ca-certificate.crt');
 $rbody = curl_exec($curl);
July 9th 19 at 13:17
1 answer
July 9th 19 at 13:19
Solution
Use fsockopen.
Open the socket to the desired server and write to the output stream all the headlines, sent and read the input stream at the end close the socket.

Try the host to write to add curl, it's just a matter of minutes.

Find more questions by tags HostingPHPWeb Development