Re: Directory Structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux