Вы должны использовать curl, так как file_get_contents
требует, чтобы allow_url_fopen
был включен в конфигурационном файле php.ini (что не всегда так).
Только для curl и IP это должно выглядеть так:
// create curl resource
$ch = curl_init();
// headers for ip only
$headers = array("Host: www.myfaketopsite.com");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, "https://1.22.22:2334/pay");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
Частично ответить от: PHP cURL подключиться с использованием IP-адреса вместо имени домена
Дополнительная информация: https://www.php.net/manual/de/book.curl.php