$location = $geturl['Location'];
<?php $url = 'http://www.yahoo.com'; $geturl = get_headers($url, 1); //var_dump($geturl); $location = $geturl['Location']; //echo $location; ?>