Bueno, había buscado eeeh.. pero añadiendo 'expresiones regulares' he encontrado:
Código PHP:
<?php
function get_links($url){
$value = file_get_contents($url);
preg_match_all('/<a [^>]*href=("[^"]*"|\'[^\']*\')[^>]*>/i', $value, $match);
$urls =array_map(create_function('$a','return substr($a, 1, -1);'),$match[1]);
$total=count($urls);
//Comprobar que no estén repetidos
for($i=0;$i<$total;$i++){
echo $urls[$i].'<br>';
}
}
$url = "http://www.laurlquequieras.com";
get_links($url);
?>
debo cambiar 'a' por 'title' y ya?