I am using simple html dom to find links on a certain page using:
// Find all links
foreach($html->find('a') as $element)
echo $element->href . '<br>';
This find all the links on the page, however i want to be able to go to found links
as well and find links inside those found links recursively for example to level 5.
Any idea of how to go about?
Use a recursive function and keep track of the depth:
And you would start by calling something like
findLinks($rootUrl, 1, 5).