Retrieve The Original URL From A Shortened URL

<?php
function retrieve_shortened_link($shortUrl){
	$headers = get_headers($shortUrl, 1);
	if(is_array($headers['Location'])){
		return $headers['Location'][0];
	}else{
		return $headers['Location'];
	}
}
?>

source

Comments are closed.