How can I avoid being trapped in circular link traps when using PHP traversal?
If you store the URL that you visited in some array, you can check to see if the URL has already been visited, and if so, do not click it again.