I need a php script that will browse through a website and create a file with the following information for each page on the site:
* URL
* HTML title
The URLs should be ordered in terms of directory structure. For instance, [login to view URL] should list all of the pages in that subfolder below it. Then [login to view URL] should list all of the pages in that subfolder below it as well. That should also be true for any directories within those folders.
The idea here is to create a full picture of the navigational structure of a website. I will put a sample version in the full description below.
## Deliverables
Here is an example of what I would like the file output to be like...
[login to view URL] Home Page Title
[login to view URL] Folder Title
[login to view URL] Page Title
[login to view URL] Folder1 Title
[login to view URL] Sub-Folder1 Title
[login to view URL] Sub-Folder1 PHP Title
And so on. Hopefully that is clear. The URL and the HTML title should be tab separated and they should be outputted into a text file.
There should be an exclude ability in the script. I would prefer it to be something like:
$exclude = "/forum/,/admin/,/stats/";
So it would be a comma-separated variable that would exclude any URL that contains the exact text of one of the exclude strings. So, for example, [login to view URL] would not be listed in the output file.
Anyway, that should cover it. Thanks.