+
95
-

回答

<?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;


网友回复

我知道答案,我要回答