простой пример:
$ch = curl_init("http://t.co/...");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$yy = curl_exec($ch);
curl_close($ch);
$w = explode("\n",$yy);
$real_url = substr($w[3],10); # the fourth line is "Location: http://..."
echo $real_url;