From within PHP, how can I get the URL of a certain href by only knowing its name/description text? For example, how do I get the URL to the site map from Apples main page by searching for the string 'Site map'?
So, when starting I only know the site I want to crawl (e.g. www.apple.com) and the URL descriptor I'm interested in (e.g. 'Site map'). The correct output for the solution should be: http://www.apple.com/sitemap/
Any idea on how to solve this is highly appreciated.