Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Проверяет, есть ли проблема с SSL и дохлым DST ROOT CA X3 в Joomla
<?php
$ch = curl_init();
$options[CURLOPT_HTTPGET] = true;
$options[CURLOPT_NOBODY] = false;
$options[CURLOPT_CAINFO] = __DIR__ . '/libraries/src/Http/Transport/cacert.pem';
$options[CURLOPT_URL] = 'https://webmasterskaya.xyz';
$options[CURLOPT_HEADER] = true;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_HTTPHEADER][] = 'Expect:';
$options[CURLOPT_FOLLOWLOCATION] = true;
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
if (!is_string($content))
{
$message = curl_error($ch);
if (empty($message))
{
// Error but nothing from cURL? Create our own
$message = 'No HTTP response received';
}
var_dump($message);
}
$info = curl_getinfo($ch);
curl_close($ch);
echo "<pre>";
var_dump($info);
@progreccor
Copy link

progreccor commented Oct 17, 2021

какой результат ожидаем?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment