|
|
@ -2008,23 +2008,28 @@
|
|
|
|
if ($nest > 10)
|
|
|
|
if ($nest > 10)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
$context_options = array(
|
|
|
|
if (version_compare(PHP_VERSION, '7.1.0', '>=')) {
|
|
|
|
'http' => array(
|
|
|
|
$context = stream_context_create($context_options);
|
|
|
|
'header' => array(
|
|
|
|
|
|
|
|
'Connection: close'
|
|
|
|
$context_options = array(
|
|
|
|
),
|
|
|
|
'http' => array(
|
|
|
|
'method' => 'HEAD',
|
|
|
|
'header' => array(
|
|
|
|
'timeout' => $timeout,
|
|
|
|
'Connection: close'
|
|
|
|
'protocol_version'=> 1.1)
|
|
|
|
),
|
|
|
|
);
|
|
|
|
'method' => 'HEAD',
|
|
|
|
|
|
|
|
'timeout' => $timeout,
|
|
|
|
if (defined('_HTTP_PROXY')) {
|
|
|
|
'protocol_version'=> 1.1)
|
|
|
|
$context_options['http']['request_fulluri'] = true;
|
|
|
|
);
|
|
|
|
$context_options['http']['proxy'] = _HTTP_PROXY;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (defined('_HTTP_PROXY')) {
|
|
|
|
|
|
|
|
$context_options['http']['request_fulluri'] = true;
|
|
|
|
$context = stream_context_create($context_options);
|
|
|
|
$context_options['http']['proxy'] = _HTTP_PROXY;
|
|
|
|
$headers = get_headers($url, 0, $context);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$headers = get_headers($url, 0, $context);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$headers = get_headers($url, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (is_array($headers)) {
|
|
|
|
if (is_array($headers)) {
|
|
|
|
$headers = array_reverse($headers); // last one is the correct one
|
|
|
|
$headers = array_reverse($headers); // last one is the correct one
|
|
|
|