You can use https://gist.github.com/1358174 and this XPath:
//a[starts-with(@title, "specific title")]/@href
This query means:
//a find all a elements in the html
[ that
starts-with(
@title has a title attribute
'specific-title' starting with this value
)
]
/@href and return their href attribute
Example (demo):
$result = xpath_match_all(
'//a[starts-with(@title, "specific title")]/@href',
$yourHtmlAsString
);
Output:
array(2) {
[0]=>
array(1) {
[0]=>
string(38) "<href>http://urltoretrieve.ext/</href>"
}
[1]=>
array(1) {
[0]=>
string(25) "http://urltoretrieve.ext/"
}
}
The result is an array containing the serialized innerHTML and outerHTML of the found attribute nodes. If you dont understand what a node is, check DOMDocument in php
Also see How do you parse and process HTML/XML in PHP?