Re: [PHP] Directory Structure
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Fri, 08 Sep 2006 02:17:49 -0400
On Fri, 2006-09-08 at 10:42 +0530, Manoj Singh wrote:
Hello all,
I am developing a site in which i have to show the directory structure of
any server i.e the admin will enter any site name and i have to show the dir
structure of that site name.
Crawl baby, crawl! You need to load a page, grab the link references,
and then crawl each of those links. You will want to make sure you stay
on the same server (don't jump to URLs not matching the initial domain).
So that you don't bog down in recursion hell, I'd maintain a queue of
URLs still to be processed. And as you finish a page, grab the next
page. You are going to run into the problem of loops, in which case you
need a game plan for handling looped links. My suggestion is if the
target link already exists in your queue or processed list, then skip
it. So once you have all the links, just go ahead and split up the paths
into their respective parts and build the directory tree.
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
.
- References:
- Directory Structure
- From: "Manoj Singh"
- Directory Structure
- Prev by Date: Re: [PHP] Directory Structure
- Next by Date: Re: [PHP] Strange server crash problem
- Previous by thread: Re: [PHP] Directory Structure
- Next by thread: Re: [PHP] Directory Structure
- Index(es):
Relevant Pages
|