I have made a function that finds all the URLs within an html file and repeats the same process for each html content linked to the discovered URLs. The function is recursiv
Rather than disabling the xdebug, you can set the higher limit like
xdebug.max_nesting_level=500