There is a cloud server with 1C deployed on it. I need to remotely connect to its database from the site. If I manually enter the path https://terminal.scloud.ru/scxxxxsex/ws/Exchange?wsdl in the browser, I am asked to login authorization + password, as in the screenshot:
I enter in the browser and get the correct answer.
But the task - to do the same through php, so that the answer was received and processed on the site. And the problem is that I don’t understand through which variables I need to give my login and password. And in the end, I get an HTTP Error 401.2 - Unauthorized
// создаем подключение $ch = curl_init('https://terminal.scloud.ru/scxxxx_basex/ws/Exchange?wsdl'); // устанавлваем даные для отправки curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); // флаг о том, что нужно получить результат curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // отправляем запрос $response = curl_exec($ch); // закрываем соединение curl_close($ch); 