Assuming a valid html page containing, anywhere on the page, these links
<a href="http://yourdomain.example.com">Text</a>
<a href="http://otherdomain.example.com">More text</a>
<a href="relative_url">Internal link</a>
And this script to check for your link, i.e. yourdomain.example.com
$h = 'full contents from html page';
$d = new DomDocument();
$d->loadHTML($h);
$x = new DOMXPath($d);
$nodelist = $x->query('//a[@href="http://yourdomain.example.com"]');
echo 'length: ' . $nodelist->length . '<br/>';
if ($nodelist->length) {
foreach($nodelist as $n) {
echo $n->nodeValue . '<br/>';
}
}
Output
length: 1
Text
So, all you need to do is check that for $nodelist->length (i.e. it is > 0).
Edit: If you only wish to check a certain part of the url, you could of course use any of the relevant xpath functions such as
//a[starts-with(@href,"http://yourdomain.example.com")]