<?php
$headersss = get_headers("https://baidu.com", 1);
if (isset($headersss['Location'])) {
if (is_array($headersss['Location'])) {
$_realurls = end($headersss['Location']);
} else {
$_realurls = $headersss['Location'];
}
}
echo $_realurls;
网友回复
<?php
$headersss = get_headers("https://baidu.com", 1);
if (isset($headersss['Location'])) {
if (is_array($headersss['Location'])) {
$_realurls = end($headersss['Location']);
} else {
$_realurls = $headersss['Location'];
}
}
echo $_realurls;
网友回复