Created
October 13, 2021 10:59
-
-
Save kernusr/74dc666148ccd753eaaee4128fdb059a to your computer and use it in GitHub Desktop.
Проверяет, есть ли проблема с SSL и дохлым DST ROOT CA X3 в Joomla
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
какой результат ожидаем?