$body]); // Отправляем в 1С как form-запрос $context = stream_context_create([ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/x-www-form-urlencoded\r\n", 'content' => $postData, 'timeout' => 10 ] ]); // Локальный вызов — быстро и безопасно $url = 'http://127.0.0.1/ycapi/hs/yc/ywebhooks'; $result = @file_get_contents($url, false, $context); if ($result === FALSE) { http_response_code(500); echo "Error forwarding to 1C"; } else { http_response_code(200); echo "OK"; } ?>