Questo può andarti bene?
Codice:
<?php
//$input = '<div><a class="pluto" id="ident" href="http://www.sito.it/pippo/li-n_k.php" id="ident">ciao</a></div>gfdsgfdg<a href="link2.php">ciao2</a>';
$url = "tuapagina.html";
$input = @file_get_contents($url) or die('Could not access file: $url');
$regexp = '/<a([a-zA-Z0-9=" ]*)href="([A-Z:\/a-z0-9._-]*)"([a-zA-Z0-9=" ]*)>([a-zA-Z0-9., :;\/-_()<>!?]*)<\/a>/i';
preg_match_all($regexp, $input, $matches);
foreach($matches[2] as $match)
{
echo $match.'<br />';
}
?>