Skip to content

Instantly share code, notes, and snippets.

@kernusr
Created October 13, 2021 10:59
Show Gist options
  • Save kernusr/74dc666148ccd753eaaee4128fdb059a to your computer and use it in GitHub Desktop.
Save kernusr/74dc666148ccd753eaaee4128fdb059a to your computer and use it in GitHub Desktop.
Проверяет, есть ли проблема с 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

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

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