Use the Dom parser
to get the href from the <a>
tag
<?php
$file = "your.html";
$doc = new DOMDocument();
$doc->loadHTMLFile($file);
$elements = $doc->getElementsByTagName('a');
foreach ($elements as $tag) {
echo $tag->getAttribute('href');
}